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
♿️(course glimpse) improve global accessibility of a course glimpse #1620
♿️(course glimpse) improve global accessibility of a course glimpse #1620
Conversation
Creating this PR early to talk about one thing that would require some notable changes @jbpenrath @sampaccoud The fact that each course glimpse is a big With a screen reader, when navigating in the course glimpse, each thing is announced as a "link". It's not obvious at all that each thing is a link to the course itself, and not a link to the thing it describes. For example, when hearing "link, organization, [organization name]", we expect to be redirected to the organization, not the course. And with a mouse, one big anchor wrapping everything also breaks the selection of text, preventing copy/pasting stuff. Proposals to fix this:
I wouldn't personally recommend trying to keep the exact same current behavior ("being able to click the whole block wherever to activate the link"), as it would require some dirty JS tricks to make it kind of accessible. |
ad7995f
to
fdd091b
Compare
Hmm.. I believed that screen reader cannot navigate within a course glimpse. From my side I used Voice Over to test it and I cannot navigate within the glimpse by using tab key. So I'm not sure to take your point.
The click area will be too much reduced, not a fan of this suggestion.
Pros: We could add link to Organization or Categories on glimpses
Yes use custom JS here is not the right way. |
With a screen reader, the usual way of navigating in the content is more to use arrow keys than tab keys. Because the tab key, like without a screen reader, only makes focusing "focusable" things possible (links, buttons, inputs, etc.), contrary to the arrow keys that lets you focus any content. So you could check by using the VO key+arrows instead of tab.
Yes, I think we could have an invisible, absolutely positioned And this would prevent the bonus of adding links on organization/categories ;) |
fdd091b
to
8ed6684
Compare
8ed6684
to
bb22205
Compare
My proposal to handle the big wrapping
The result is:
demo-course-glimpse.mp4What do you think? If you think it's OK I'll reproduce this in the django templates. |
Just to notice than since Bootstrap 5.0 there is the stretched link feature which is somewhat to implement the "link wrapper around container" behavior without to use a link wrapper, but a simple link instead. However it may not work in some context and i don't know about its accessibility. |
885b117
to
1f525c4
Compare
ba43269
to
9f703b9
Compare
This should be good for review with the changes made on TS and django template code @jbpenrath 👌 |
10bec9b
to
5f73e2e
Compare
Hey @jbpenrath if you have time to review this today I'd appreciate it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great works 👏
5f73e2e
to
739adc6
Compare
560a5be
to
8f0e855
Compare
organization, code and date icons let users understand that what is written next to them are organization name, course code and course date. So, they convey meaning but they are hidden from screen readers. Add the alt text so that screen reader users get the meaning from the icons.
putting info related to the course glimpse before its heading is not great for two reasons: - with a screen reader, when navigate by headings on the page to jump between each course glimpse, it makes users miss the info - with a screen reader, when navigating in the content "normally" (with down arrow), the first thing announced for a glimpse course is the icon title, which is pretty misleading. We should hear the course name instead.
It's a bit confusing when navigating via screen reader to only hear "Sous-titres" or "Malentendants". Specify it's a category just before to be more explicit.
1c73510
to
3ea2a20
Compare
this makes for a better UX for screen reader/keyboard users. The idea is to have a big clickable zone for mouse users with the link on the media cover + on the title, with the link on the title having a bigger clickable space than shown. We manually add/remove the card shadow when the link is hovered/focused src/richie/apps/courses/templates/courses/cms/fragment_course_glimpse.html
3ea2a20
to
b01ba05
Compare
Purpose
Make a course glimpse more understandable when using a screen reader.
Proposal
A few stuff can be done:
<a>
wrapping everythingNote: some improvements are already added via #1611 (most notably, the removal of redundant
title
attributes)