Skip to content

Attach button disabled styles to aria-disabled #6461

@FelFly

Description

@FelFly

Summary

Using the disabled property on buttons means that individuals navigating by keyboard cannot interact with the button. In some cases, such as when a tooltip is present to explain why the button is disabled, this means they cannot trigger the tooltip. aria-disabled communicates the same information as disabled but permits interaction with the button. While the calcite-button does allow use of just the aria-disabled property - it would appear the visual styling is tied to the disabled attribute. Since it appears aria-disabled is also present when disabled is applied, attaching the styling to the aria property would provide a more consistent visual pattern regardless of use-case.

Actual Behavior

When a calcite-button has the disabled property, keyboard focus cannot be transferred to the button by the tab key: https://codepen.io/FelFly/pen/RwYbqqe

Expected Behavior

When a disabled button contains information available by tooltip, using only aria-disabled communicates the disable state while permitting keyboard focus to be moved to the button: https://codepen.io/FelFly/pen/gOdYQQq?editors=1100

Reproduction Sample

https://codepen.io/FelFly/pen/RwYbqqe

Reproduction Steps

  1. Open code pen with disabled attribute applied to button that has an associated tooltip
  2. Press tab

Reproduction Version

1.0.3

Working W3C Example/Tutorial

No response

Relevant Info

No response

Regression?

No response

Esri team

ArcGIS Hub

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - newNew issues that need assignment.ArcGIS HubIssues logged by ArcGIS Hub team members.a11yIssues related to Accessibility fixes or improvements.bugBug reports for broken functionality. Issues should include a reproduction of the bug.needs triagePlanning workflow - pending design/dev review.p - highIssue should be addressed in the current milestone, impacts component or core functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions