-
Notifications
You must be signed in to change notification settings - Fork 11
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
#709: Lighthouse check: Cookiebanner ARIA #40
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ const DialogTabList = (cookieInformation) => { | |
transform: scaleY(-1); | ||
} | ||
</style> | ||
<li part="${PREFIX}__tab-list-item" role="presentation"> | ||
<li part="${PREFIX}__tab-list-item" role="tab"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je voegt hier There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eigenlijk dient de Ik denk dat de originele tabs-opzet binnen deze package eigenlijk niet ideaal is. Normaliter is de tablist hetgeen wat de tabjes representeert. En onder de tablist heb je dan verschillende tabpanelen. Zie ook: En op deze pagina zie je een standaard implementatie die eigenlijk gevolgd zou moeten worden: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-manual/#tablist-1 Overigens ben ik niet getrouwd met het idee dat dit perse een tablist moet blijven, het kan waarschijnlijk ook versimpeld worden naar een lijst zoals je vaak ziet bij FAQ-items. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks voor dit voorbeeld ik raakte inderdaad erg in de wr van de bestaande code. Ik heb er nu bewust voor gekozen om het te laten voor wat het is omdat er de laatste tijd al erg veel aan deze package gewerkt is, en dit voor nu even de meest pragmatische oplossing leek. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CountNick Wat betekent dit effectief? Is het wat jou betreft dan bij deze afgerond en is deze PR dan weer ready for review? Laat me weten als ik weer moet kijken :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MicheleNL Deze kan wat mij betreft nu inderdaad weer worden bekeken :) |
||
<header part="${PREFIX}__tab" class="${PREFIX}__tab"> | ||
<label part="${PREFIX}__option" class="${PREFIX}__option" data-required="${required}"> | ||
<input | ||
|
@@ -57,9 +57,10 @@ const DialogTabList = (cookieInformation) => { | |
part="${PREFIX}__tab-toggle" | ||
class="${PREFIX}__tab-toggle" | ||
role="tab" | ||
id="${PREFIX}-tab-${index}" | ||
id="${PREFIX}-tab" | ||
href="#${PREFIX}-tabpanel-${index}" | ||
aria-controls="${PREFIX}-tabpanel-${index}" | ||
aria-owns="${PREFIX}__tab-list" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heb je There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lighthouse gaf aan dat There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Afgaande op wat er op MDN staat denk ik toch niet dat deze |
||
aria-selected="false" | ||
aria-label="${Config().get("labels.aria.tabToggle")}"> | ||
<svg part="${PREFIX}__tab-toggle-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 16"><path d="M21.5.5l3 3.057-12 11.943L.5 3.557 3.5.5l9 9z"/></svg> | ||
|
@@ -95,7 +96,7 @@ const DialogTabList = (cookieInformation) => { | |
: undefined, | ||
})); | ||
return ` | ||
<ul part="${PREFIX}__tab-list" class="${PREFIX}__tab-list" role="tablist" aria-label="${Config().get("labels.aria.tabList")}"> | ||
<ul part="${PREFIX}__tab-list" id="${PREFIX}__tab-list" class="${PREFIX}__tab-list" role="tablist" aria-owns="${PREFIX}-tab" aria-label="${Config().get("labels.aria.tabList")}"> | ||
${cookiesWithState.map(renderTab).join("")} | ||
</ul> | ||
`; | ||
|
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.
aria-role="dialog"
Is dit correct? Ik denk dat ditrole="dialog"
moet blijven?https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
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.
Ik denk dat dit al verholpen zou moeten zijn door het toevoegen van de aria-labelledby
Binnen ARIA is het belangrijk dat iets een naam, rol en waarde heeft. Als 1 van de dingen ontbreekt dan snapt het algoritme dat de accessible naam bepaalt, het niet meer.
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.
Ah ja dit moest inderdaad

role="dialog"
blijven, ik blijf hier alleen wel deze melding voor krijgen metrole="dialog"
vandaar dat ik het een en ander aan het proberen was