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

Epic: Component a11y consistency with disabled and aria-disabled attributes (2036570545) #7775

Open
dqateam opened this issue Sep 19, 2023 · 10 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library spike complete Issues that have a research spike completed and dev work can proceed

Comments

@dqateam
Copy link
Collaborator

dqateam commented Sep 19, 2023

Violation:

Ensure ARIA roles, states, and properties are valid. In each case both the disabled and aria-disabled attributes are added causing error reports across the design system.

<button
          ...
          aria-disabled={toAriaBoolean(disabled)}
          ...
          disabled={disabled}

Fix

Calcite should get rid of the aria-disabled where disabled is present.

We could consider an eslint rule to prevent both aria-disabled and disabled from being set in the JSX per Matt's recommendation in the list-item issue #7796 (comment).

Components affected

  • action
  • block
  • dropdown
  • split-button
  • color-picker
  • combobox
  • fab
  • input
  • input-message
  • input-date-picker
  • list-item
  • rating
  • panel
  • radio-button
  • select
  • slider
  • switch
  • stepper-item
  • tabs
  • tile
  • tile-select

image

WCAG Reference:

Severity:

5

Media Type:

ARIA


Areas for Remediation:

  • Title: Action - Ensure ARIA roles, states, and properties are valid - (2036570545)
  • Module: Action
    Pattern: ARIA – Redundant aria-disabled Attribute]

Issue
There are elements with invalid ARIA attribute aria-disabled="true" as it already has native HTML disabled attribute.

Occurrences
04 Action

  • element present below the heading "Test 6 Disabled"
    08 Block & Block Section
  • element present below the heading "Test 5. Disabled Block"

09b Split Button

  • element present below "Test 3. Disabled Split Button"
    10 Color Picker
  • element present below "Test 2. Color Picker Disabled"
    11 Combobox, Combobox Item Group and Combobox Item
  • present below the heading "Test 4. Disabled combobox".
  • "Disabled first response item" available after activating combobox present below the heading "Test 7. Combobox groups and disabled items".
    14a Floating Action Button (FAB)
  • Test 3. Disabled
    16 Input & Input Message
  • Test 6. Disabled Input
    17a Input Date Picker
  • Test 2. Disabled Input Date Picker
    17b Input Time Picker
  • Test 2. Disabled Input Time Picker
    19 List, List Item Group and List Item
  • Test 2. Disabled List
    20b Rating
  • Disabled with average and chip
    23a Panel
  • Test 2. Disabled Panel
    24 Pick List, Pick List Group and Pick List Item
  • Disabled item, A disabled pick list item. Test 3. Disabled Pick List
    26 Radio Button and Radio Button Group
  • Test 2. Disabled Radio Button Group, Test 3. "Data" Disabled Radio Button
    27 Radio Group and Radio Group Item
  • Test 4. Radio group disabled
    28a Select
  • Test 2. Disabled Select
    28b Slider
  • Test 2. Disabled Slider, Histogram disabled
    28c Switch
  • Test 4. Switch Checked and Disabled
    31 Stepper and Stepper Item
  • "Test 1. Horizontal layout". Step 4 contains a "disabled" property present below heading "Test 2. Grid layout". Step 4 contains a "disabled" property present below heading "Test 3. Vertical layout and Small scale".
    32 Tabs, Tab Nav, Tab Title and Tab
  • Ships (disabled)
    33 Tile
  • River section after "Disabled Tile:" heading
    34 Tile Select Group and Tile Select
  • element after "Tile Select Group Disabled", "utility" section after "Tile Select Disabled", Manufacturing section after "Radio with disabled tile select" and Checkbox with disabled tile select

User Impact
Assistive technologies may be unable to parse this content.

[Code R
eference]

(..)

Suggestion
Ensure ARIA roles, states, and properties are valid. Many ARIA attributes can only be used on certain elements. Some can only be used in combination with other attributes. Additionally, if an attribute references an ID, that ID must be present in the page.

To detect many of these errors automatically, use the Nu Html Checker: https://validator.w3.org/nu/

Compliant Code Example

<div calcite-hydrated="" tabindex="-1" summary="Materials or substances such as minerals, forests, water, and fertile land that occur in nature and can be used for economic gain." heading="Natural Resources" disabled="">
(..)
</div>

Additional Resources:

  • Report Source: Product accessibility evaluation conducted on the Calcite Design System in August, 2022.
@dqateam dqateam added 0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 19, 2023
@geospatialem
Copy link
Member

geospatialem commented Dec 27, 2023

This issue includes multiple components, but will need some additional insights and direction from the testers to determine next steps.

Components affected:

  • action
  • block
  • dropdown
  • split-button
  • color-picker
  • combobox
  • fab
  • input
  • input-message
  • input-date-picker
  • list-item
  • rating
  • panel
  • radio-button
  • select
  • slider
  • switch
  • stepper-item
  • tabs
  • tile
  • tile-select

@geospatialem geospatialem changed the title Action - Ensure ARIA roles, states, and properties are valid - (2036570545) Epic: Component a11y consistency with disabled and aria-disabled attributes (2036570545) Dec 27, 2023
@geospatialem geospatialem self-assigned this Jan 8, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jan 8, 2024
@github-actions github-actions bot added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Feb 23, 2024
Copy link
Contributor

cc @geospatialem, @brittneytewks

@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Apr 3, 2024
@driskull
Copy link
Member

@geospatialem the only valid instance of this is found on action.

aria-disabled={toAriaBoolean(disabled)}
aria-label={ariaLabel}
aria-pressed={toAriaBoolean(active)}
class={buttonClasses}
disabled={disabled}

All the other instances are a result of the interactive helper.

if (component.disabled) {
component.el.setAttribute("aria-disabled", "true");

These components have a disabled property on them still need the aria-disabled as well because they are not native HTML elements that have a disabled attribute/property. I think the tool reporting these instances is wrong.

@driskull
Copy link
Member

@jcfranco if we did want to try and adjust this, we would need to move the aria-disabled to a container within the component and not on the host.

driskull added a commit that referenced this issue Sep 23, 2024
**Related Issue:** #7775

## Summary

- only set `disabled` on action, not `aria-disabled` since it is
redundant.
@driskull
Copy link
Member

@geospatialem can we spike this one to determine if we need to remove setting aria-disabled on disabled components?

@geospatialem
Copy link
Member

@geospatialem can we spike this one to determine if we need to remove setting aria-disabled on disabled components?

@driskull Believe when we checked in with our consultant earlier this year it was recommended to remove aria-disabled when setting disabled.

@driskull
Copy link
Member

@geospatialem I wonder if they understand these are web components and not HTML elements like an input or button that have a disabled attribute/property. They may be missing some context.

@geospatialem
Copy link
Member

Once #10374 is merged the remaining components, with the helper, as-is.

When we conduct the audit with our third party vendor in early 2025 we should communicate that its best to interpret the contents as-is to determine if assistive technologies are unable to parse content, or if this surfaces since the custom disabled and aria-disabled are present in the HTML markup. cc @driskull

@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. estimate - 3 A day or two of work, likely requires updates to tests. and removed 0 - new New issues that need assignment. estimate - 5 A few days of work, definitely requires updates to tests. labels Sep 23, 2024
driskull added a commit that referenced this issue Sep 25, 2024
**Related Issue:** #7775

## Summary

- remove setting `aria-disabled` where the `InteractiveContainer` will
handle setting `aria-disabled`
- add `InteractiveContainer` to handle component
- picklist and valuelist also need this but they are deprecated so I
didn't update them
- some components were setting `aria-disabled` without `toAriaBoolean`
so they weren't working anyway `aria-disabled={this.disabled}`
- `date-picker-month-header` was not using `toAriaBoolean`
- update e2e test
- After this PR, we can evaluate if we need to update the
`Interactive.tsx` helper.
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 2 - in development Issues that are actively being worked on. labels Oct 28, 2024
@geospatialem geospatialem self-assigned this Oct 28, 2024
@geospatialem
Copy link
Member

Once #10374 is merged the remaining components, with the helper, as-is.

When we conduct the audit with our third party vendor in early 2025 we should communicate that its best to interpret the contents as-is to determine if assistive technologies are unable to parse content, or if this surfaces since the custom disabled and aria-disabled are present in the HTML markup. cc @driskull

Changed assignment to address/communicate with Level for the 2025 audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library spike complete Issues that have a research spike completed and dev work can proceed
Projects
None yet
Development

No branches or pull requests

3 participants