question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Explore aria live region solutions

See original GitHub issue

The current implementation of the aria-live region works pretty well, but we are starting to hit some edge cases. Specifically when we are attempting to announce a message that has previously been on the DOM.

Example being (once my other PR is merged) if I attempt to select a disabled option, it announces ‘option ${value} is disabled. Select another option.’ which is correct. If I then focus on another option I get another appropriate message, but when navigating back to attempt to select the disabled option again, voice over does not announce the message again because it has not changed.

Options include appending <p> elements within the A11yText component instead of changing the paragraph content, or alternating live regions. Essentially both tricks in order to make sure the VoiceOver recognizes a change.

There was a library (not sure which) that took care of the more elaborate switching solution, but was decided against because it didn’t support all of our use cases. Maybe it’s time to revisit it and maybe fork it? Let’s discuss 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
seancurtiscommented, Nov 19, 2019

We built it originally using the aria attributes, but it falls over once you start trying to support multiple selections. The browser/AT support was also pretty atrocious when we tested that. There are slight changes in the 1.1 version of the spec, but those didn’t support all the use cases either.

Other features such as async loading of items (conveying something like “20 options added”) are impossible as well.

The same case happens for drag and drop, there is native support and aria roles, but they’re too minimal and support is bad, hence live regions.

0reactions
ebonowcommented, Dec 18, 2020

Greetings,

In an effort to close old issues, we will be closing this issue. If you feel this is still relevant, then let us know and we can kindly re-open this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ARIA live regions - Accessibility - MDN Web Docs - Mozilla
ARIA live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced...
Read more >
Screen reader support for ARIA live regions - TPGi
An ARIA live region is a simple mechanism for notifying screen readers when content is updated on the page. Despite the obvious Accessible ......
Read more >
Aria-live in JavaScript Frameworks - DEV Community ‍ ‍
The content within an aria-live region is automatically read by assistive technology when new content appears in that region.
Read more >
ARIA Live Regions for single page applications - Stack Overflow
The simplest way is to use aria-live=assertive on a region that explains the page is loading. You can Google how to implement that...
Read more >
Hiding and updating content - web.dev
aria -live # · additions, meaning that any element being added to the live region is significant. · text, meaning that text content...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found