What fresh hell is THIS now? - Patrick Lauke
[cryberg] Hi all! I could use some help, if anyone has a minute to spare.
I'm dealing with a table of data that uses infinite scrolling; the idea being that there is so much data to fetch from the server, that loading it in batches while you scroll will ameliorate any performance issues. So, when you scroll to the end of the table, a new row will be added to the end that will show the message "Loading more records..." and then be replaced with the newly fetched batch of table rows.
I want to notify a screen reader user when the "Loading more records..." message has shown up, and I thought that wrapping the message in a div
with role="alert"
would do the trick. However....it's not working.... the message is never announced.
When I tried to test it out by just statically adding a role="alert"
message to the table, without being triggered by the infinite scrolling, it announced just fine.
role=“alert”
, it won’t read out that message. But if you have an existing role=“alert”
and update the text inside of it, it will read out the message.
alert
should work most of the time. It has spotty support in VO, either Chrome or Safari doesn't work. Maybe it's because it's in the table? Tried appending it after the table itself and see if it works @cryberg ?