-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add visually hidden text to summary list examples
- Loading branch information
1 parent
41d858c
commit 1af4ab1
Showing
1 changed file
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,14 +29,18 @@ export const Standard: Story = { | |
<SummaryList.Key>Name</SummaryList.Key> | ||
<SummaryList.Value>Sarah Philips</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<a href="stories#">Change</a> | ||
<a href="#"> | ||
Change<span class="nhsuk-u-visually-hidden"> name</span> | ||
</a> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
<SummaryList.Row> | ||
<SummaryList.Key>Date of birth</SummaryList.Key> | ||
<SummaryList.Value>5 January 1978</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<a href="stories#">Change</a> | ||
<a href="#"> | ||
Change<span class="nhsuk-u-visually-hidden"> date of birth</span> | ||
</a> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
<SummaryList.Row> | ||
|
@@ -49,7 +53,9 @@ export const Standard: Story = { | |
SE23 6FH | ||
</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<a href="stories#">Change</a> | ||
<a href="#"> | ||
Change<span class="nhsuk-u-visually-hidden"> contact information</span> | ||
</a> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
<SummaryList.Row> | ||
|
@@ -59,11 +65,20 @@ export const Standard: Story = { | |
<BodyText>[email protected]</BodyText> | ||
</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<a href="stories#">Change</a> | ||
<a href="#"> | ||
Change<span class="nhsuk-u-visually-hidden"> contact details</span> | ||
</a> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
</SummaryList> | ||
), | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: 'Change links must include visually hidden text. This means a screen reader user will hear a meaningful action, like "Change name" or "Change date of birth".' | ||
} | ||
} | ||
} | ||
}; | ||
|
||
export const SummaryListWithoutActions: Story = { | ||
|