🐛(lagaufre) use accessibleName for service aria-label - #59
Conversation
Allow full accessible names while keeping shorter display names.
8c33721 to
442f7fb
Compare
|
Hey there :) my 2 cents:
So from my pov we shouldn't merge this as is. Accessible name should always contain the visible name. If you really feel that short names should be explained, we should set things like "Fr. Transfert - France Transfert" in accessible names, if the visible name is "Fr. Transfert". Not just "France Transfert". sorry if I misunderstood something, I'm on vacation, just checking this quickly 🌴 |
Thank you @manuhabitela for the detailed answer, I get the point. The audit (Sophie) flagged that the France Transfert link does not have an explicit enough accessible name. At the same time, the full label “France Transfert” does not really fit in the grid tile, which is maybe why it is “Fr. Transfert”. What would you recommend in that case ? We can talk about it on visio ;) ! |
|
Hey there, To strictly conform to WCAG we should set something like I guess in that case we could argue that it's obvious that "Fr = France" here and writing only Personally I'd stick to the guidelines and make sure to repeat the visible name. I was a bit against this PR because it allows us to use totally different strings for visible name and accessible name, and this guideline of "accessible name must at least contain visible name" is not well known. So it allows for easy mistakes on the authoring/dev side. But oh well I'm a bit too wary about a small thing I guess, with good comments and a little care, no reasons that wouldn't work! |
|
|
||
| type Service = { | ||
| name: string; | ||
| accessibleName?: string; |
There was a problem hiding this comment.
to prevent misusage, I'd add a comment here, i.e. something like that:
name: string;
/* String to use as aria-label if the visible name is not self-explanatory enough.
It should start with the visible name or at least include it (see https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html) */
accessibleName?: string;| { | ||
| "id": "france-transfert", | ||
| "name": "France Transfert", | ||
| "accessibleName": "Fr. Transfert (France Transfert)", |
There was a problem hiding this comment.
isn't this for the old Gaufre, where France Transfert is already written in full? You should not need your accessible name here I think.
There was a problem hiding this comment.
You're right, thanks! Removed it from services.json since the old Gaufre already shows the full name.
I'll set "Fr. Transfert (France Transfert)" on the landing page side, where the visible name is actually short.
9d8b522 to
5a8da97
Compare
Purpose
Use the full accessible name for France Transfert in the La Suite app switcher (#49). The landing page API can keep a short display name (
Fr. Transfert) while screen readers announce the full service name.Proposal
accessibleNameto the lagaufre widgetServicetypeaccessibleName || nameforaria-labelin lagaufre v2GaufrePage.astro)accessibleNamefrom/api/v1/services.jsonwhen present