Skip to content

Clarify that role="button" does not inherit button functionality#43186

Merged
hamishwillee merged 3 commits intomdn:mainfrom
abelmark:clarify-button-role-no-inherited-functionality
Feb 23, 2026
Merged

Clarify that role="button" does not inherit button functionality#43186
hamishwillee merged 3 commits intomdn:mainfrom
abelmark:clarify-button-role-no-inherited-functionality

Conversation

@abelmark
Copy link
Contributor

Description

Clarifies the summary and description paragraphs of the button role page to make explicit that role="button" does not inherit any native button functionality — event listeners and keyboard handling must be added manually.

Motivation

The original wording ("provides no button functionality") was ambiguous. It could be read as saying a button with this role has no useful functionality at all, rather than conveying that the role only affects how assistive technology announces the element. The updated wording makes clear that the semantic role is communicated to screen readers, but the interactive behavior (event listeners, keyboard handling) is not inherited and must be implemented by the developer.

Additional details

The change is applied to both the opening summary sentence and the equivalent sentence in the Description section.

Related issues and pull requests

N/A

@abelmark abelmark requested a review from a team as a code owner February 22, 2026 01:13
@abelmark abelmark requested review from hamishwillee and removed request for a team February 22, 2026 01:13
@github-actions github-actions bot added Content:Accessibility Accessibility docs size/xs [PR only] 0-5 LoC changed labels Feb 22, 2026
Copy link
Contributor Author

@abelmark abelmark left a comment

Choose a reason for hiding this comment

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

Key motivation here was a teammate was interpreting this as a role you add to an item you want tab focusable that does not have any mouse/keyboard interaction from a user.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

Preview URLs (1 page)

(comment last updated: 2026-02-23 06:49:38)

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Thanks very much @abelmark , and welcome to MDN.

@hamishwillee hamishwillee merged commit 4bd173b into mdn:main Feb 23, 2026
8 checks passed
wbamberg added a commit to wbamberg/content that referenced this pull request Feb 26, 2026
* upstream/main: (619 commits)
  Fix usage of numbers iterator in zip example (mdn#43236)
  Synchronize with BCD v7.3.3 (mdn#43178)
  Add Firefox 148 sanitizer release note (mdn#43234)
  WebDriver conformance changes for Firefox 148 (mdn#43228)
  ci(auto-merge): fix target-repo (mdn#43139)
  Add session mgt guide (mdn#42908)
  docs(firefox-release): Finalize release notes for Fx148 release (mdn#43225)
  [Technical Review] Add folder for WebDriver BiDi and create initial landing pages (mdn#43153)
  fix: correct 'after' to 'before' in break-before always/all descriptions (mdn#43185)
  added the release note for position-try-order (mdn#43223)
  Clarify that role="button" does not inherit button functionality (mdn#43186)
  Fix wording mistake in Temporal.ZonedDateTime (mdn#43188)
  Fix description for break-before: always (mdn#43190)
  improve confusing sentance (mdn#43172)
  Document scoped customElementRegistry and related properties (mdn#43149)
  fix: correct terminology for object initializer property names (mdn#43182)
  Fix typo about arrow function expression body (mdn#43175)
  Update InterfaceData based on WebRef (mdn#43179)
  Fix clarify visibilitychange event intro to mention all triggers (mdn#43177)
  [WebExtensions] Document runtime.getVersion() method (mdn#42971)
  ...
jdatapple pushed a commit to jdatapple/content that referenced this pull request Mar 6, 2026
…#43186)

* Clarify that role="button" does not inherit button functionality

* Replace the term "inherit" as it added semanatics that were not needed

---------

Co-authored-by: Mark Abel <markabel@MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Accessibility Accessibility docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants