wagtail / guide

A website to teach Wagtail CMS to content editors, moderators and administrators.
https://guide.wagtail.org
BSD 3-Clause "New" or "Revised" License
30 stars 26 forks source link

Address accessibility feedback from audit #179

Open thibaudcolas opened 1 year ago

thibaudcolas commented 1 year ago

Audit by Scott: #76.

thibaudcolas commented 1 year ago

Copying the findings from Scott,


WAVE

Errors

Warnings

Firefox dev tools accessibility panel

Axe

Pa11y

Tweaks we could make to hit Level AAA

Manual observations

Keyboard navigation

macOS VoiceOver

Other miscellaneous accessibility concerns

Other random non-a11y stuff I don't want to forget

nicklee commented 1 year ago

I've ticked off the items I believe are addressed by #204, this fixes quite a bit of the items but we still have a fair few to address.

Scotchester commented 1 year ago

I've ticked off the items I believe are addressed by #204, this fixes the majority of items but we still have a fair few to address.

Awesome, @nicklee! Will try to review that soon.

lb- commented 1 year ago

Not sure if it's already listed (could not see it) but the skip link is cut off on < md breakpoints and not visible at all on < small breakpoints.

Screen Shot 2022-10-26 at 7 31 10 pm

Even though small devices are less likely to have a keyboard, I would expect this link to become visible no matter what the viewport width.

thibaudcolas commented 1 year ago

Ticked off a couple more items based on recent changes. If you spot broken links please let me know.

thibaudcolas commented 1 year ago

@Scotchester from an accessibility standpoint, do you think we should process broken links differently in Wagtail when rendering them on a page?

Here is the logic where we discard URLs and on save page identifiers when storing rich text links in the DB: https://github.com/wagtail/wagtail/blob/1434a93c5418b2dbd4ec22e7ba2761c62f6fcb51/wagtail/admin/rich_text/converters/contentstate.py#L24-L28

And here is where we create <a> tags with no href if we can’t resolve a page link: https://github.com/wagtail/wagtail/blob/919dab00e5e4e66e936dc93cff52793785cf4080/wagtail/rich_text/pages.py#L24

It would be possible for us to give those links a dummy href, or store the page’s URL at the point of creation of the link and use that as a fallback (which would still very likely cause a 404 but one that might be easier to track down).

Scotchester commented 1 year ago

It's a tricky question... I think there are valid reasons to let it render broken links (for example, the text around them could indicate the presence of a link, and getting a broken one might be less confusing than not seeing one at all), but I remember being confused by the way the screen reader handled the <a> with no href. I don't remember the specifics of how it did that, though; I should have recorded them. I will test again to refresh my memory.

Scotchester commented 1 year ago

store the page’s URL at the point of creation of the link and use that as a fallback (which would still very likely cause a 404 but one that might be easier to track down)

I will say, though, speaking for myself as a general user, I would prefer this approach.