-
Notifications
You must be signed in to change notification settings - Fork 425
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
v2: Explicitly specifying the implicit role of a fieldset element changes the styling #430
Comments
@willclarktech, thanks. I would not remove |
Hm, I thought it was standard a11y linting, but it seems this is raised by Svelte for VSCode: https://svelte.dev/docs/accessibility-warnings#a11y-no-redundant-roles To be clear, this isn't a blocker for me. I just thought default roles were worth considering. |
As |
Hello, As ARIA selectors are already in Pico, shouldn't we use aria-orientation ? |
I've found that the W3C validator also complains about this usage of Warning The It's also worth noting that this isn't really an "accessibility complaint" (am i misunderstanding what "a11y complains" means in prior discussion?). It's unnecessary here because the group role is implicit; specifying it here is supposed to make absolutely no difference whatsoever. Pico has two different ways here to style what is supposed to be two identical elements. |
@sodiboo Correct, this isn't specifically an accessibility complaint. Svelte's accessibility tooling is just how I came across the general issue that explicitly specifying the implicit role of an element can affect the styling, which indicates that roles are being somewhat abused by the current approach. Sounds like this is a "won't fix" but would love to see it considered if there's ever a v3! |
What about using |
Describe the issue
First of all thank you so much for Pico, I love it!
According to the docs:
The examples there use a
fieldset
element, but the implicit role offieldset
is alreadygroup
and a11y complains about a redundant role: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#technical_summaryThis kind of issue might affect other elements too, I haven't checked.
Current Behavior
Explicitly specifying the default role of a
fieldset
element changes the styling.Expected Behavior
It should not make a difference to the style whether the role of an element is implicit or explicit. I'm not sure what the best solution is, but maybe the default styling for a
fieldset
should be thegroup
styling (ie horizontal), and the other styling (ie vertical) can be triggered by setting the role tonone
orpresentation
?Reproduction URL
n/a
Environment
n/a
The text was updated successfully, but these errors were encountered: