[wp-trac] [WordPress Trac] #47612: Media modal: implement a default title for the modal H1 heading
WordPress Trac
noreply at wordpress.org
Wed Jun 26 10:41:29 UTC 2019
#47612: Media modal: implement a default title for the modal H1 heading
---------------------------------------+--------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: Media | Version:
Severity: normal | Keywords:
Focuses: accessibility, javascript |
---------------------------------------+--------------------
Splitting this out from #47145.
Now that #47145 proposes to make the Media modal a real ARIA modal dialog,
it's important that the modal always has a H1 heading. This heading needs
to be referenced by the `aria-labelledby` attribute set on the dialog
container.
Currently, all the core Media modals provide a meaningful text for their
H1. However, when a title is not passed to the media frame, the modal H1
is just an empty heading. An empty `<h1>` isn't ideal and should be
avoided.
Plugins and theme authors that use `wp.media()` to add a media modal may
miss to pass a title. As the title is of great importance
[https://www.w3.org/TR/wai-aria-practices-1.1/#dialog_roles_states_props
to give the dialog its required accessible name], there should be a simple
fallback to a default title.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47612>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list