Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

bug(Tabs): Accessibility issues with Tab Pagination

未關閉
#32,856 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
angular, typescript

研究方向

從 Material tabs overview page 開始,將視窗調整為700px或更小,以檢查分頁標籤的箭頭。檢查分頁元素如何向鍵盤、螢幕閱讀器和語音導覽使用者公開,然後驗證所得的語意和標籤是否符合 issue 中預期的行為。

由索引模型根據 Issue 內容生成。

描述

Accessibility area: material/tabs P4
Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

No response

Description

The information below is from a report from Evinced with 2 findings (Interactable Role and Accessible Name) on the Tab Pagination elements:

Interactable Role

Interactive elements, such as buttons, links, and inputs, must convey that they can be interacted with by using the proper semantics.

Severity: Critical
Cause: Screen readers are unable to identify that the element is interactive due to missing or incorrect semantics.
Effect: Screen reader users may not find the content or may not realize that the the content is interactive.
Read more in Evinced Knowledge Base
How To Fix:
Use native HTML interactive elements such as <button>, <a>, <select>, <input>. Alternatively, add the appropriate ARIA role that corresponds to the content purpose.

WCAG Violations: 4.1.2 Name, Role, Value (Level A)
Section 508: 1194.21(d)
EN 301 549: 9.4.1.2 Name, Role, Value

Accessible Name

Elements that can be interacted with, such as buttons, links, and input fields, must have an accessible name. The name should indicate which information or action is required, and/or what will happen if they interact with it.

Severity: Critical
Cause: The element does not have an accessible name to inform the screen reader of its purpose and function.
Effect: Assistive technologies use the accessible name to label, announce and trigger the element's action. If there's no valid accessible name, assistive technologies won't be able to understand the element correctly.
Read more in Evinced Knowledge Base
How To Fix:
Depending on the type of element, either add a descriptive text to the body of the tag or add the appropriate attributes to the tag.

WCAG Violations: 4.1.2 Name, Role, Value (Level A)

Reproduction

This issue is visible on the Material documentation page:
https://material.angular.dev/components/tabs/overview

Resize your window to 700px or less for the Tab Pagination 'chevron' elements to appear. Inspect these elements to observe their (lack of) accessible attributes.

Expected Behavior

These elements should be hidden from keyboard and screen readers.
These elements should be labeled for voice navigation.

The potential fix could include applying the following attributes to each arrow

role=button aria-hidden=”true” tabindex=-1

aria-label with 'Scroll Tabs Right' or 'Scroll Tabs Left'

Actual Behavior

Each tab pagination 'button' is composed of 2 div elements:

<div mat-ripple="" class="mat-ripple mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after">
    <div class="mat-mdc-tab-header-pagination-chevron"></div>
</div>

This is an interactive element that isn't adequately labeled / accessible for voice navigation users.

Environment
  • Angular: 20
  • CDK/Material: 20
  • Browser(s): Chrome, any
  • Operating System (e.g. Windows, macOS, Ubuntu): any
主要語言
TypeScript
星號
25k
分支
6.8k
平均合併
2 天 19 小時
30 天內合併 PR
82

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

angular/components 的其他 Issue

查看 angular/components 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。