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

Accessibility test on all components #2355

Open
1 task
Tracked by #1809
Febakke opened this issue Aug 30, 2024 · 0 comments
Open
1 task
Tracked by #1809

Accessibility test on all components #2355

Febakke opened this issue Aug 30, 2024 · 0 comments
Assignees
Labels
♿️ accessibility Issues related to accessibility

Comments

@Febakke
Copy link
Member

Febakke commented Aug 30, 2024

Accordion

Navigation and Screen reader

  • Should open when pressing spacebar, enter, mouseclick and VO-click
  • Should have visible focusindicator
  • Should have correct role, label and state
  • State is announced when toggling
  • Title is announced when toggling
  • Logical tab-order

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Color and contrast

  •  Color is not the only indicator of state change
  • Text, indicators and focus have good enough contrast

Misc (All fixed)

Alert

Guidelines

  •  Correct usage of aria-live and moving focus is documented in storybook (This might be handled by the systemerrors)
  • Importance of good content for Alerts are documented in storybook
  • How and when should one use role="alert"? Should this be the default?

Screen reader

  • Handled by guidelines

Contrast

  •  Icon and text should have good enough contrast

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc (fixed)

  • We should concider removing aria-label on icons. The content inside the Alert should be enough to indicate importance of alert
Badge

Screen reader

  •  Should have an aria-label.
    • Should have role="img" and make aria-label prop required see discussion
    • Documentation / guidelines in storybook

Contrast

  •  Text inside badge should have good enough contrast

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing
Breadcrumbs

Navigation

  • Each link should have a focus indicator
  • Logical tab-order

Screen reader

  •  When entering breadcrumbs it should announce the navigation role
  • If breadcrumbs is rendered as a single back button it should be a single link and not an nav
    • It should also have an aria-label announcing that you are going back one level.
  • If the link is the same as the page the user is on, it should announce "current page"

Contrast

  • Text, icons and focus indicator should have good enough contrast

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc

Button

Navigation

  • Button has a visible focus indicator
  • Click area is over 40px (24px is requirement)

Contrast

  •  Text should have good enough contrast

Screen reader

  • Should have correct role, label and state

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc

Card

Screen reader

  • Should have correct role and label
  • If it is a linkcard the important link text should be the first element that is read. (Added a note to misc about this)

Navigation

  • Card has a visible focus indicator
  • Click area is over 40px (24px is requirement)

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc

  • Storybook: as should be as child
  • Storybook: Add that if the card is a link it should not have any interactive elements inside
  • Take another shot at changing the semantic order inside the cards to make it more accessible for screen readers. Relevant article
  • Fix story in storybook so that it scales when zoomed
  • Document: When should cards be in ul > li and when should they not?
  • Add figcaption to image
Checkbox

Navigation

  • Each checkbox should have a visible focus indicator
  • Toggle with spacebar

Screen reader

  • Should have correct role, label and state
  • Legend is read as a title for the checkbox group

Contrast

  •  Checkbox in checked/unchecked have good enough contrast
  • All texts have good enough contrast

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc

  • Remove story with a checkbox without label
  • If you have a checkbox with description and there is a related error. The error should be read before the description
  • Add an aria-disabled on read-only checkboxes. (read only is not announced by screen reader)
  • We need to look at fieldsetdescriptions and their relations to inputs
  • Add a story with description on checkbox
  • Checkbox description is the only element that you can not style as a user of the designsystem
Chips

TODO - After #2321

Combobox

Consider using U-elements U-tags Our multiselect is not usable with screen readers as is. It might be better to use our resources into U-elements instead of continue on our own component

Divider

No WCAG requirements

Misc

  • Screen readers should not announce this component.
Dropdown

Screen reader

  • Should have correct role, label and state

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc

  • Can we use native popover API for better tab handling
  • Our dropdown API is implying one set structure, we should consider making more atomic
Error-summary

Misc

  • We need to do some adjustments to our error-summary
    • remove connection between list-elemenets and header.
    • aria-relevant="all" and aria-live="polite" are redundante
    • We need to include a tabindex= "-1"so that you can move focus to the summary
    • We need test the open/close story with NVDA, JAWS and Narrator
Fieldset

Misc

  • Better examples, should only be used for fields that are connected. Card information for example.
HelpText

Zoom

  • Is built on top of Popover, which uses max-width set in px. This should change to rem to support text scaling

Navigation

  • Arrow should be drawn by pseudo element or get aria-hidden="true" to avoid announcing "dialog with 2 items"
  • Popover should not have role="dialog" as this causes an extra screen reader stop where helptext title is announced again, instead of accessing helptext content
  • All this will be fixed if using Popover API as suggested in fix(Popover): use native Popover API and CSS refinements #2369

Misc

  • We should use aria-label instead of span class="ds-sr-only" for label text
Link

Zoom

  • Link is wrapping when zooming
Skeleton

Misc

  • Needs a11y have documentation:
    • Focus management: When loading is done, you should manually move focus to the first heading of the loaded content, to make screen reader users aware the content is loaded.
    • Accessible name: The component conveys its status by exposing the aria-label value (normally "loading").
    • Live announcements: If you change the children/content of the (e.g. with the timedContent prop), this will be announced as it also has aria-live="polite".
Spinner

Misc

  • Needs a11y have documentation:
    • Focus management: When loading is done, you should manually move focus to the first heading of the loaded content, to make screen reader users aware the content is loaded.
    • Accessible name: The component conveys its status by exposing the aria-label value (normally "loading").
    • Live announcements: If you change the children/content of the (e.g. with the timedContent prop), this will be announced as it also has aria-live="polite".
Modal

Zoom

  • Should allow to grow to top and bottom of window to avoid too small area (gets max-height from browser which we should overwrite)
  • Should set max-width in rem and not px to allow text only zoom

Screen reader

  • Missing aria-label or aria-labelledby on dialog element
  • Should have aria-label on close button (not title), and use aria-hidden on inner SVG
  • Should consider documenting autoFocus regardless of form fields? (works on anything that can receive focus)
  • Should consider moving x before heading so screen reader users does not skip the heading element
NativeSelect Not much to test on this component. Do zoom and screen reader tests.

Screen reader

  • test that labels and descriptions are read correctly

Misc

  • Consider remove the mutliple select example from storybook
  • Consider renaming to Select
Pagination Not much to test on this component. Do zoom and screen reader tests.

Zoom

  • Must allow wrapping to allow zooming

Screen reader

Documentation

  • Document how to move focus when clicking pagination item in a single page application

Misc

  • Should add &ellipsis; instead of ... to get the correct ellipsis from font
  • Could simplify itemLabel to become just a string?
Popover

Zoom

  • Popover max-width set in px. This should change to rem to support text scaling

Navigation

  • Arrow should be drawn by pseudo element or get aria-hidden="true" to avoid announcing "dialog with 2 items"
  • Popover should not have role="dialog" as this causes an extra screen reader stop instead of announcing content
  • All this will be fixed if using Popover API as suggested in fix(Popover): use native Popover API and CSS refinements #2369
Radio

Same as Checkbox:

Navigation

  • Each checkbox should have a visible focus indicator
  • Toggle with spacebar

Screen reader

  • Should have correct role, label and state
  • Legend is read as a title for the checkbox group

Contrast

  •  Checkbox in checked/unchecked have good enough contrast
  • All texts have good enough contrast

Zoom

  •  All content is visible when zooming in 400%
  • All content is visible when text only zoom is 200%
  •  Content is visible when changing text spacing

Misc

  • Remove story with a checkbox without label
  • If you have a checkbox with description and there is a related error. The error should be read before the description
  • Add an aria-disabled on read-only checkboxes. (read only is not announced by screen reader)
  • We need to look at fieldsetdescriptions and their relations to inputs
  • Add a story with description on checkbox
  • Checkbox description is the only element that you can not style as a user of the designsystem
Search

Misc

SkipLink

Works like a charm ❤️

Switch
  • Add an aria-disabled on read-only checkboxes. (read only is not announced by screen reader)
Table

Misc

  • Should we add role to all elements to elements to ensure we always have table behavior regardless of display (often display: flex is used on tables to achieve responsive approaches)? (see https://adrianroselli.com/2018/05/functions-to-add-aria-to-tables-and-lists.html)
  • Should Table.HeaderCell have sort?: true | 'none' | 'ascending' | 'descending'} instead of having a separate sortable property to avoid confusion and more 1:1 api with aria-sort?
Tabs

Zoom

  • Make convention for what to do with wrapping or similar when zooming

Misc

Tags

Zoom

  • Should allow wrapping text (and remove redundant display: flex)
Textarea **Misc** Very nice implementation of counter ❤️ - Can remove redundant `aria-relevant` - Can add `field-sizing: content` for better user experience when typing multiple lines
ToggleGroup

Zoom

Misc

  • Can remove redundant tabindex="0" on role="radiogroup"
  • Should only use aria-checked, aka. remove aria-current
Tooltip

Screen reader

  • Should always have aria-description instead of aria-describedby to allow access to tooltip when navigating in forms mode
  • Should add aria-hidden="true" to tooltip box to prevent redundant announcement
  • Should add example where tooltip is used as label, i.e. in story https://next.storybook.designsystemet.no/?path=/story/komponenter-togglegroup--only-icons the tooltip is not the description, but the actual label of the element - we should support this in some way

Misc

  • Always test components with content before and after
  • We need to define what smaller devices we should test on?

Tasks

Preview Give feedback
@Febakke Febakke converted this from a draft issue Aug 30, 2024
@Febakke Febakke added the ♿️ accessibility Issues related to accessibility label Sep 2, 2024
@Febakke Febakke added this to the V1 - Helhetlig komponentbibliotek milestone Sep 2, 2024
@Febakke Febakke moved this from ☂ Epics to 🏗 In progress in Team Designsystemet Sep 2, 2024
eirikbacker added a commit that referenced this issue Sep 10, 2024
Part of #2295 
Not fixing accessibility/wrapping/display:flex in this PR as this will
be part of work after #2355
Barsnes pushed a commit that referenced this issue Sep 11, 2024
Part of #2295 
Not fixing accessibility/wrapping/display:flex in this PR as this will
be part of work after #2355
@Febakke Febakke added the 🧭 roadmap Used in roadmap label Sep 27, 2024
@mrosvik mrosvik removed the 🧭 roadmap Used in roadmap label Oct 15, 2024
@Febakke Febakke moved this from 📄 Todo to 🏗 In progress in Team Designsystemet Nov 8, 2024
@mrosvik mrosvik modified the milestones: V1 - Helhetlig komponentbibliotek, V1 - Must-have Dec 16, 2024
@Febakke Febakke moved this from 📄 Todo to 🏗 In progress in Team Designsystemet Jan 2, 2025
@mrosvik mrosvik moved this from 🏗 In progress to 📄 Todo in Team Designsystemet Jan 10, 2025
mimarz pushed a commit that referenced this issue Jan 14, 2025
Related to #2944 and
#2449

Fixes issues found in #2355
@mrosvik mrosvik removed this from the V1 - Must-have milestone Jan 20, 2025
mimarz pushed a commit that referenced this issue Feb 21, 2025
Part of #2295 
Not fixing accessibility/wrapping/display:flex in this PR as this will
be part of work after #2355
mimarz pushed a commit that referenced this issue Feb 21, 2025
Related to #2944 and
#2449

Fixes issues found in #2355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿️ accessibility Issues related to accessibility
Projects
Status: 📄 Todo
Development

No branches or pull requests

3 participants