Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Accessibility: Adding attachments can be problematic #2182

Open
carlj11 opened this issue Apr 11, 2024 · 0 comments
Open

Admin Accessibility: Adding attachments can be problematic #2182

carlj11 opened this issue Apr 11, 2024 · 0 comments
Labels

Comments

@carlj11
Copy link

carlj11 commented Apr 11, 2024

Admin mode, adding attachments

  • create a media embed block
  • click “add attachment”
  • choose a thumbnail size, or choose whether to show the title; no way to choose the media to be added

A set of choices opens but the screen reader has no idea that the page has changed, so you need to code this semantically like a modal / dialog (i.e. it doesn’t need to look like one visually).

  • add role="dialog" to the container • add aria-labelledby=“id-of-popup-title” to the container
  • if a message should be announced (say instructions or whatever) you can add aria-describedby=“id-of-message” to the container as well
  • add this to the DOM
  • shift focus to a focusable item inside the popup container
    • if it’s just a message then this is the close or OK button which dismisses the popup
    • if there are other things in there like options to choose, then focus on the first of these (which should of course be properly labeled)

• be sure that when the popup is closed / dismissed, focus returns to the “add attachment” button, or whatever control launched the popup

There is now a dialog element in HTML which has become widely supported which may be useful.

See: ARIA: dialog role - Accessibility | MDN

@kimisgold kimisgold added the a11y label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants