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

accessibility: Entire message history seems to be visible, causing spurious live region activity #10888

Open
ndarilek opened this issue Nov 25, 2018 · 5 comments

Comments

@ndarilek
Copy link
Contributor

Not sure if this is related to #10793. When I use Zulip with my screen reader, the entire message history for a stream is read on first access. This to me suggests that the stream is visible in the DOM, even if it isn't visible visually. As such, we get hundreds or thousands of live regions.

If an ARIA region is actually hidden (I.e. not present in the DOM via display: none or something else) then this shouldn't be an issue. This may be a dupe, but on the off chance that it isn't, I wanted to open it so we could track a fix.

Thanks.

@zulipbot
Copy link
Member

Hello @zulip/server-misc members, this issue was labeled with the "area: accessibility" label, so you may want to check it out!

@timabbott
Copy link
Sponsor Member

@ndarilek what's going on here is that we load from the server and render as a large scrollable region up to ~400 messages on first page load. This produces a nice scrolling experience for users interacting with Zulip with a mouse (we actually fetch more from the server, and thus can do rerenders to update the set of messages displayed without going to the server as well). The overall effect is that it's absolutely expected that a large number of messages are in the DOM for a given stream that might be off either the top or bottom of the screen visually. We have plenty of handy JS functions for identifying which messages are visible onscreen.

I suspect handling the ARIA situation for this correctly likely involves making the live ARIA region be e.g. the currently selected message (which has a blue box around it for sighted folks, is integrated with keyboard navigation, and careful tracking logic prevents from going off the top/bottom of the page).

@ndarilek
Copy link
Contributor Author

ndarilek commented Nov 26, 2018 via email

@timabbott
Copy link
Sponsor Member

timabbott commented Nov 27, 2018

OK. The offscreen messages are just hidden by their scrolling position being off the top of the screen -- so we don't need to run any JS on-scroll.

@timabbott
Copy link
Sponsor Member

One approach we could take is adding the "live region" tag dynamically only when we have the bottom of the screen in view, or something like that?

Another question that comes to mind -- how will this "live region" feature interact with messages being removed and replaced in the DOM (e.g. because of a message edit) -- will it reread those too?

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

No branches or pull requests

4 participants