Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Improve accessibility of the output code for the webring #16

Open
ohhelloana opened this issue Oct 25, 2022 · 2 comments
Open

Improve accessibility of the output code for the webring #16

ohhelloana opened this issue Oct 25, 2022 · 2 comments

Comments

@ohhelloana
Copy link

ohhelloana commented Oct 25, 2022

Hello!
I think there's room to improve the accessibility of the output code as the arrows don't read well on screen readers (or as a standalone link).

On my own website I added some aria-labels to describe the arrows. Here's an example:

<a href="https://xn--sr8hvo.ws/previous" aria-label="Previous website in the IndieWeb webring">←</a> An IndieWeb Webring 🕸💍 <a href="https://xn--sr8hvo.ws//next" aria-label="Next website in the IndieWeb webring">

Since my website already has lang=en set it doesn't matter, but this might not be be case for people copy/pasting this code who may have a website in any other language. So I also think there should be some sort of lang=en wrapping up the output.

I also like Calum's approach on his website.

Opening up the issue as I'm sure there could be great suggestions of how to keep the code simple as well.

@martymcguire
Copy link
Owner

Thanks for kicking this off @ohhelloana !

I've been idly thinking about this for the past week and I am currently leaning towards using your proposal and wrapping it in a <div> something like this:

<div lang="en">
<a href="https://xn--sr8hvo.ws/previous" aria-label="Previous website in the IndieWeb webring"></a> An IndieWeb Webring 🕸💍 <a href="https://xn--sr8hvo.ws//next" aria-label="Next website in the IndieWeb webring">
</div>

While it seems that aria-label is still not translated by most translation software, the lang + aria-label hints should at least give screen reader users a clear reading of the English-only labels on the links.

In the interests of translate-ability, I'd prefer to do some kind of visually-hidden class for screenreaders only, but I think it's too far to include a CSS declaration for one, and feels difficult to document concisely.

Maybe it would be possible to start with the above as a default, then enhance it by offering an "advanced" widget to let you enter your own label texts and language indicator. An even more advanced step could be indicating whether your site already has a visually-hidden or sr-only class and applying that.

In general I love to try and "under-engineer" things so that they are concise and each piece makes sense to someone looking at it who might not have a deep understanding of HTML. However, accessibility takes priority over that!

Looking forward to others' thoughts!

@ohhelloana
Copy link
Author

I do like the idea of an advanced/customisable output (for the future).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants