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

Notification Bar: improve a11y when notification opens. #459

Open
amychurchwell opened this issue Aug 8, 2019 · 3 comments
Open

Notification Bar: improve a11y when notification opens. #459

amychurchwell opened this issue Aug 8, 2019 · 3 comments

Comments

@amychurchwell
Copy link
Contributor

Description

[Consideration from work in PR #431]

We should consider a11y when a notification is programatically opened using JS.

What should happen:

  • Should focus move to the notification title when it is displayed?
  • Should that be required, or optional?
  • Do we need any additional ARIA information?
@stephaniehobson
Copy link
Contributor

Could ARIA live regions be useful here? (I have not actually looked at the code so use your best judgement).

@craigcook
Copy link
Member

craigcook commented May 15, 2020

(originally filed as a separate issue):

The notification bar includes an optional "close" button (for when it's used as a dismissable dialog) but our examples don't have a readable text label in that button. A screen reader might skip over the button entirely, or announce it without stating what it does since its purpose isn't clear without a label. The button should have an accessible label like "Close notification" that can be visually hidden.

We're also showing static examples with a button that wasn't inserted via JavaScript, so the button in those examples does nothing. Of course they're just static examples, but that isn't made clear by the documentation so someone could easily copy-paste the markup and plonk a static bar on their site with a non-functional, inaccessible button that shouldn't be there. We can probably solve this just by adding more usage guidelines in the docs.

We could also add an aria role to the bar: role="dialog" for non-critical messages and role="alertdialog" for critical errors. Maybe some other aria bits, like the aforementioned live regions.

@craigcook
Copy link
Member

Labels are added to the example buttons in #579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants