Fix accessibility issue in contents list component #3907
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Stop dashes before each 'Contents' list item being read by screen readers
Why
Nearly every screen reader (except NVDA of the major ones) reads out the “em dash“ before each item/link in the “Contents“ list. Screen reader users found that frustrating to read through.
Trello card
Accessibility testing
VoiceOver example
VoiceOver Before
content-list-before.mov
VoiceOver After
content-list-after.mov
Further info
Using
list-style-type
We considered using list-style-type, however this did present us with 2 issues.
Using
speak
We also explored other options, such as using the CSS speak property to turn off voice output for screen readers. On top of this, browser support is very limited currently, so this is not an option - "speak" | Can I use... Support tables for HTML5, CSS3, etc