Opened 9 years ago
Closed 9 years ago
#32724 closed defect (bug) (fixed)
Customizer Menus: Accessibility: improve markup for menu item lists
Reported by: | designsimply | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.3 | Priority: | high |
Severity: | normal | Version: | 4.3 |
Component: | Customize | Keywords: | has-patch needs-refresh |
Focuses: | accessibility | Cc: |
Description
/hat tip @afercia for the original report at https://github.com/voldemortensen/menu-customizer/issues/91
Posts, Pages, Categories, etc. present a list of available items and ideally should be marked up as lists. Currently, each item is a dl
missing a required dd
element.
The same considerations about the text "Add Menu Item" and the suggested technique from #32721 apply here.
About the text, I'm not sure "Add Menu Item" is appropriate. We should try to consider what will be read out by screen readers together with the other text, for example:
- When tabbing, only the button will be focused and the text read out will be just "Add Menu Item" without any reference to the link
- When arrowing, the text read out will be something like:
Post Hello World button Add Menu Item
Probably, I would consider to completely hide from assistive technologies the item title and repeat the title in the button itself, something like:Post <span aria-hidden="true">Hello World</span> button Add Hello World to the Menu
This technique is used in several places in core, for example in the Post publish box:
<a href="#edit_timestamp" ... > <span aria-hidden="true">Edit</span> <span class="screen-reader-text">Edit date and time</span> </a>
Attachments (1)
Change History (16)
#6
follow-up:
↓ 8
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 4.3
- Version set to trunk
In 32724.diff:
- Use lists for available menu items
- Remove unused template for available item types
- Hide the type label and title from screen readers and instead include them in the add button (this probably needs context and/or a comment for translators, but not sure how best to handle that @ocean90)
This should be everything else we need for this ticket. Note that regular menu items already use lists because Customizer control containers are lists by default.
#7
@
9 years ago
Patch missed div
-> ul
for taxonomy containers, but that should be a quick fix on commit.
#8
in reply to:
↑ 6
@
9 years ago
Replying to celloexpressions:
- Hide the type label and title from screen readers and instead include them in the add button (this probably needs context and/or a comment for translators, but not sure how best to handle that @ocean90)
Take a look at https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context and https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#descriptions for this. The current string wouldn't be easy to translate. Something like Add %2$s (%1$s) to menu
would be better.
Patch missed
div
->ul
for taxonomy containers, but that should be a quick fix on commit.
Please provide patches which doesn't require changes by a committer.
#9
@
9 years ago
- Type changed from enhancement to defect (bug)
Changing from "enhancement" to "bug" as agreed with @obenland.
#11
@
9 years ago
What about: Add to menu: %2$s (%1$s)
Would be something like "Add to menu: Hello World (post)".
Also noting some comments from @ocean90 from the previous issue: