大网数据广告活动
Web 标准与前端开发

ARIA: aria-rowindextext attribute

· 52CE 我爱测

The `aria-rowindextext` attribute defines a human-readable text alternative of `aria-rowindex`.

The aria-rowindextext attribute defines a human-readable text alternative of aria-rowindex.

Description

When you have a very long table or when you purposefully want to display just a section of a table, not all rows may be present in the DOM. When this happens, we use the aria-rowcount with an integer value to define how many rows the table (or grid) would have if all the rows were present and add the aria-rowindex property on each row and spanning cell to provide information on the row index within that larger table. When the value of aria-rowindex is not meaningful or does not reflect the displayed index, we can also add the aria-rowindextext to provide a human-readable text alternative to the aria-rowindex integer value.

The aria-rowindextext should only be included in addition to, not as a replacement of, the aria-rowindex. Some assistive technologies use the numeric row index for the purpose of keeping track of the user's position or providing alternative table navigation. The aria-rowindextext is useful if that integer value isn't meaningful or does not reflect the displayed index, such as a game of Chess or Battleship.

The aria-rowindextext is added to each tr or to elements with the row role. It can also be addition to cells or owned elements of each row.

Values

  • <string>
    • The human-readable text alternative of the numeric aria-rowindex

Associated interfaces

  • Element.ariaRowIndexText
    • : The ariaRowIndexText property, part of the Element interface, reflects the value of the aria-rowindextext attribute.
  • ElementInternals.ariaRowIndexText
    • : The ariaRowIndexText property, part of the ElementInternals interface, reflects the value of the aria-rowindextext attribute.

Associated roles

Used in roles:

Inherited into roles:

Specifications

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。