-
Notifications
You must be signed in to change notification settings - Fork 42
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
Radio component a11y fixes #2562
Conversation
…aced on the FieldSet
🦋 Changeset detectedLatest commit: 09fda11 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Storybook demoEndringer til review: 22bf664833 | 61 komponenter | 400 stories |
…creen reader When using multiple elements (span, etc) inside of a label, each one will be added as a screen reader "stop" and announced both as part of the label and as a separate text element. Using this technique overrides this, to create the same experience as if the was only text inside of the label (native-like).
…we include an error message.
@@ -70,7 +70,7 @@ export const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>( | |||
> | |||
<fieldset | |||
{...omit(rest, ["errorId", "error", "size", "readOnly"])} | |||
{...inputProps} | |||
{...omit(inputProps, ["aria-invalid"])} |
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.
Denne påvirker bare CheckboxGroup og RadioGroup i våre komponenter, men er vi bekymret over at andre har brukt Fieldset og ikke koblet feilmelding til komponenten? 🤔 Vi tar bort aria-invalid fordi den er redundant når vi har feilmelding koblet til Fieldset/input.
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.
men er vi bekymret over at andre har brukt Fieldset og ikke koblet feilmelding til komponenten?
Vil denne endringen gjør de løsningene som ikke har gjort det enda værre en før? Så de går fra dårlig -> dårligere?
Ser ut som å endre
til
Løser feilen 🤔 @it-vegard Edit: Laget en PR på det #2589 |
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.
🔥
Remove aria-invalid from individual Radio components because it is placed on the FieldSet
Description
Change summary
PR Checklist 📝 (Remove fields after check!)
New component? ✨
@navikt/core/css/config/_mappings.js
. This is needed for correct build and CDN upload.@navikt/core/css/index.css
@navikt/core/css/tokens.json
@navikt/core/react/src/index.ts
Component-updates 🎉
New component
is still accounted for@navikt/aksel-stylelint/src/deprecations.ts
with a suitable description. This helps stylelint-users keep their code clean and bug-free.Documentation 📝
aksel.nav.no/website/pages/eksempler
Note: Props, tokens and examples only updates to sanity on merge to main
Versioning 🏷️
yarn changeset
to generate a version-entry for change.