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

Major revision: tabpanel role #13743

Merged
merged 9 commits into from
Mar 22, 2022
Merged

Major revision: tabpanel role #13743

merged 9 commits into from
Mar 22, 2022

Conversation

estelle
Copy link
Member

@estelle estelle commented Mar 10, 2022

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@estelle estelle requested a review from a team as a code owner March 10, 2022 23:10
@estelle estelle requested review from ericwbailey and removed request for a team March 10, 2022 23:10
@estelle estelle marked this pull request as draft March 10, 2022 23:10
@github-actions github-actions bot added the Content:Accessibility Accessibility docs label Mar 10, 2022
@estelle estelle mentioned this pull request Mar 10, 2022
42 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2022

Preview URLs

Flaws

URL: /en-US/docs/Web/Accessibility/ARIA/Roles/tabpanel_role
Title: ARIA: tabpanel role
on GitHub
Flaw count: 2

  • broken_links:
    • Anchor not lowercase
    • Can't resolve /en-US/docs/Web/Accessibility/ARIA/Roles/

External URLs

URL: /en-US/docs/Web/Accessibility/ARIA/Roles/tabpanel_role
Title: ARIA: tabpanel role
on GitHub

(this comment was updated 2022-03-22 00:50:45.719594)

@estelle estelle changed the title Draft: Major revision: tabpanel role Major revision: tabpanel role Mar 14, 2022
@estelle estelle marked this pull request as ready for review March 14, 2022 19:07
Comment on lines 23 to 24
Tabs do not act as anchor links to individual panels. While semantic HTML may be coded with the tabs being anchor links natigating to the tab's associated tabpanel, when JavaScript is used to progressively enhance the content to a tabbed interface, the link's default behavior should be prevented.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Tabs do not act as anchor links to individual panels. While semantic HTML may be coded with the tabs being anchor links natigating to the tab's associated tabpanel, when JavaScript is used to progressively enhance the content to a tabbed interface, the link's default behavior should be prevented.

Hide the non-visible tabpanels that are not currently relevant with the HTML {{htmlattrxref('hidden')}} attribute or set [`aria-hidden="true"`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby). Browsers won't render elements with the `hidden` attribute set. If using `aria-hidden`, use CSS to hide the hidden tab panels.
The newly selected `tab` is considered "active" and should have it`s [`aria-selected`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected) attribute set to `true` while all other tabs in the same `tablist` should have the `aria-selected` attribute set to `false`, or removed altogether. See [ARIA `tab` role](/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role) for move information.

If the `tablist` precedes the `tabpanel` in source order, the user will expect to be able to step through the remaining tabs in focus order or select the <kbd>down arrow</kbd> to give focus to the visible tabpanel when navigating by keyboard.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If the `tablist` precedes the `tabpanel` in source order, the user will expect to be able to step through the remaining tabs in focus order or select the <kbd>down arrow</kbd> to give focus to the visible tabpanel when navigating by keyboard.
If the `tablist` precedes the `tabpanel` in source order, the user will expect to be able to step through the remaining tabs in focus order or select the <kbd>Down Arrow</kbd> to give focus to the visible tabpanel when navigating by keyboard.

@ericwbailey ericwbailey merged commit e4273ab into mdn:main Mar 22, 2022
@estelle estelle deleted the tpanel branch August 19, 2022 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Accessibility Accessibility docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants