Skip to content

Conversation

@Malvoz
Copy link

@Malvoz Malvoz commented Dec 1, 2020

Making the messagebox a live region is important as it conveys to screen readers that the content should be announced when added to the DOM, or otherwise has been updated. This PR adds the status role (a live region role) to the messagebox.

The role="status" ARIA attribute is implicitly aria-live="polite" and aria-atomic="true", however it's best to be explicit with these values per MDN advice:

To maximize compatibility, add a redundant aria-live="polite" when using this role.

And looking at the support table for role=status, we can see that not all browsers convey the implicit aria-atomic value of true by announcing the entire region, so we're explicit about that too.

FWIW I've only tested this using 1 screen reader (ChromeVox), and it works as expected; the content is announced as it is visually displayed to the user.

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

Successfully merging this pull request may close these issues.

1 participant