Skip to content
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

ErrorSummary: Remove aria-attributes #3171

Merged
merged 1 commit into from
Sep 24, 2024
Merged

ErrorSummary: Remove aria-attributes #3171

merged 1 commit into from
Sep 24, 2024

Conversation

HalvorHaugan
Copy link
Contributor

@HalvorHaugan HalvorHaugan commented Sep 23, 2024

Description

Closes https://github.com/navikt/team-aksel/issues/637

Component Checklist 📝

  • JSDoc
  • Examples
  • Documentation
  • Storybook
  • Style mappings (@navikt/core/css/config/_mappings.js)
  • Component tokens (@navikt/core/css/tokens.json)
  • CSS class deprecations (@navikt/aksel-stylelint/src/deprecations.ts)
  • Exports (@navikt/core/react/src/index.ts and @navikt/core/react/package.json)
  • New component? CSS import (@navikt/core/css/index.css)
  • Breaking change? Update migration guide. Consider codemod.
  • Changeset (Format: <Component>: <gitmoji?> <Text>. E.g. "Button: ✨ Add feature xyz.")

Copy link

changeset-bot bot commented Sep 23, 2024

🦋 Changeset detected

Latest commit: 73214f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@navikt/ds-react Patch
@navikt/ds-css Patch
@navikt/ds-tokens Patch
@navikt/ds-tailwind Patch
@navikt/aksel-icons Patch
@navikt/aksel Patch
@navikt/aksel-stylelint Patch

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

Copy link
Contributor

Storybook demo

986456f8a | 90 komponenter | 141 stories

Copy link
Collaborator

@KenAJoh KenAJoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we gain anything by removing section + removing aria-labelledby connection? Do we consider the section/region semantics redundant for screen-readers since the heading is the same?

@HalvorHaugan
Copy link
Contributor Author

Do we gain anything by removing section + removing aria-labelledby connection? Do we consider the section/region semantics redundant for screen-readers since the heading is the same?

We avoid that some screen readers reads the heading twice (once as the section name, and once as the heading). @mortentollefsen and @it-vegard discussed this on Monday, and as I remember it, there wasn't really any strong arguments on either side.

@it-vegard
Copy link
Contributor

it-vegard commented Sep 24, 2024

Do we gain anything by removing section + removing aria-labelledby connection? Do we consider the section/region semantics redundant for screen-readers since the heading is the same?

We avoid that some screen readers reads the heading twice (once as the section name, and once as the heading). @mortentollefsen and @it-vegard discussed this on Monday, and as I remember it, there wasn't really any strong arguments on either side.

Most users will navigate by heading, so we don't give up a lot to avoid the double announcement. I would have liked having the section there if we continued to focus the section. When moving focus to the heading instead, the value of having the named section is almost gone. Only when navigating with reading mode would it still be useful, but even then the value is low.

Less aria is also <3

@HalvorHaugan HalvorHaugan merged commit f71594e into main Sep 24, 2024
4 checks passed
@HalvorHaugan HalvorHaugan deleted the errorsum-aria branch September 24, 2024 13:41
@github-actions github-actions bot mentioned this pull request Sep 24, 2024
magnurh-cx added a commit to navikt/skjemabygging-formio that referenced this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants