-
Notifications
You must be signed in to change notification settings - Fork 120
Accessibility: politely Inform the the screen reader on slide change #752
base: master
Are you sure you want to change the base?
Conversation
Hi Gareth, I am getting an accessibility audit to our system and to the Essential theme. So here is one tiny and important fix. Which instructs the screen reader to wait until it finishes reading the current slide's content before starting to read the new slide that already switched. which, btw, I am told... is confusing to the listener and so we made the interval bigger and tried to shorten the text we put inside the sliders. Also, as an alternative, our accessibility advisor asked us to disable the auto switching of slides. Maybe we should put some good advise in the theme settings help? as I have no idea how system administrator with no experience using a screen reader can know about these anomalies.
Thanks Nadav, Ok, this is aria-live: https://www.w3.org/TR/wai-aria/states_and_properties#aria-live - but please provide supporting evidence that it is the correct thing to do as I don't want to make the change and then find its wrong. Also, I don't believe in reducing functionality. I believe in automatic inclusion, thus the slider should not be disabled for all for auto-sliding or should the administrator make that sort of decision. Rather that when using a screen-reader this should be detected and the code stop the slider for that demographic. Therefore, please ask the advisor how I detect screen-readers (all of them on the market). G |
Well, "off" does not seems like a good option, and "assertive" is problematic with short transition intervals (as we would probably never hear the complete text on short time periods) also, it is badly supported considering the various screenreads & OSes & browsers combinations (see: http://www.slideshare.net/maxdesign/arialive-the-good-the-bad-and-the-ugly) and "poilte" seems the polite thing to do 😄 There is no good way to detect screen readers as they do not have a "user agent" and are part of the browser (sort of extensions) as far as I searched for it on the internet. also seems like a bad habit. Interesting read: kenwheeler/slick#1937 (Remove aria-live="polite" when slider is not focused) |
Found a nice sample: http://accessibility.athena-ict.com/aria/examples/carousel.shtml |
Interesting, but not directly related: https://www.sitepoint.com/unbearable-accessible-slideshow/ |
Therefore only have aria-live="polite" when the carousel is focused? If so, then that pauses the slider anyway. |
Considering all the above links and recommendations... I think it should start "polite" as it is visible, and when not visible turned "off". is it possible? |
Umm, it's always visible! As all the slides are preloaded in markup. It's only the combination of CSS and JS that make it visually slide.
|
I meant visible/seen in the viewport of the browser. (not DOM visible) as when the user scrolls without it losing the focus it is still automatically scrolling and the screen reader will politely read it. |
Ok, contradiction. The carousel has: https://github.com/moodle/moodle/blob/MOODLE_31_STABLE/theme/bootstrapbase/amd/src/bootstrap.js#L294 which pauses the carousel when it's focused. kenwheeler/slick#1937 indicates that aria-live should not be there when not focused and there when focused. However when focused then the sliding stops, therefore its not needed then! |
Therefore need more evidence to back this up as a good thing before I pull it, then get 'agro' and then have to remove it again. |
In any event, the commit is therefore not the solution as need to be JS to add 'aria-live' when focused and remove it when not, if your argument holds water. |
Indeed. you are right. I will research this deeper and get back to you. |
4de5065
to
5030a95
Compare
Hi Gareth,
I am getting an accessibility audit to our system and to the Essential theme.
So here is one tiny and important fix.
Which instructs the screen reader to wait until it finishes reading the current slide's content before starting to read the new slide that already switched. which, btw, I am told... is confusing to the listener and so we made the interval bigger and tried to shorten the text we put inside the sliders.
Also, as an alternative, our accessibility advisor asked us to disable the auto switching of slides.
Maybe we should put some good advise in the theme settings help? as I have no idea how system administrator with no experience using a screen reader can know about these anomalies.