moodle-theme_essential icon indicating copy to clipboard operation
moodle-theme_essential copied to clipboard

Accessibility: politely Inform the the screen reader on slide change

Open nadavkav opened this issue 8 years ago • 12 comments

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.

nadavkav avatar Sep 18 '16 11:09 nadavkav

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

gjb2048 avatar Sep 18 '16 17:09 gjb2048

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 :smile:

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. and I am told by our advisor the you do not want to go there (more info: http://www.powermapper.com/tests/screen-readers/aria/)

Interesting read: https://github.com/kenwheeler/slick/issues/1937 (Remove aria-live="polite" when slider is not focused)

nadavkav avatar Sep 18 '16 18:09 nadavkav

Found a nice sample: http://accessibility.athena-ict.com/aria/examples/carousel.shtml

nadavkav avatar Sep 18 '16 19:09 nadavkav

Interesting, but not directly related: https://www.sitepoint.com/unbearable-accessible-slideshow/

nadavkav avatar Sep 18 '16 19:09 nadavkav

Therefore only have aria-live="polite" when the carousel is focused? If so, then that pauses the slider anyway.

gjb2048 avatar Sep 18 '16 22:09 gjb2048

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?

nadavkav avatar Sep 19 '16 07:09 nadavkav

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.

gjb2048 avatar Sep 19 '16 07:09 gjb2048

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. I am looking for "If You do not see it do not read it" behaviour.

nadavkav avatar Sep 19 '16 07:09 nadavkav

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. https://github.com/kenwheeler/slick/issues/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!

gjb2048 avatar Sep 21 '16 16:09 gjb2048

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.

gjb2048 avatar Sep 21 '16 16:09 gjb2048

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.

gjb2048 avatar Sep 21 '16 16:09 gjb2048

Indeed. you are right. I will research this deeper and get back to you.

nadavkav avatar Sep 21 '16 23:09 nadavkav