mdn/content

Clarification of treegrid aria-readonly

Open

#23,496 opened on 2023年1月9日

GitHub で見る
 (6 comments) (0 reactions) (0 assignees)Markdown (22,427 forks)batch import
Content:Accessibilityeffort: mediumhelp wanted

Repository metrics

Stars
 (8,900 stars)
PR merge metrics
 (平均マージ 7d 3h) (30d で 147 merged PRs)

説明

MDN URL

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/treegrid_role

What specific section or headline is this issue about?

#read-only_treegrids

What information was incorrect, unhelpful, or incomplete?

The first two lines in the 'Read-only treegrids' section states:

By default, treegrids are assumed to be editable. If a tree grid is not editable, use the aria-readonly attribute to inform assistive technologies the treegrid is readonly.

So assuming I only presents information in a table (which has a tree structure) then is seems that I should add aria-readonly="true" to the treegrid root element.

But the WAI-ARIA documentation for treegrid states

When the aria-readonly attribute is applied to a focusable gridcell, it indicates whether the content contained in the gridcell is editable.

Which makes it seems that it should only be used for editable (or disabled editable) content. Further it states:

In a treegrid that provides content editing functions, if the content of a focusable gridcell element is not editable, authors MAY set aria-readonly to true on the gridcell element. However, if a treegrid presents a collection of elements that do not support aria-readonly, such as a collection of link elements, it is not necessary for the author to specify a value for aria-readonly.

Which seems to state that it should not be necessary to specify on a information only treegrid.

WAI-ARIA Authoring Practices 1.2 states more specifically:

If the treegrid provides content editing functionality and contains cells that may have edit capabilities disabled in certain conditions, aria-readonly is set to true on cells where editing is disabled. If edit functions are disabled for all cells, instead of setting aria-readonly to true on every cell, aria-readonly may be set to true on the treegrid element. Treegrids that do not provide cell content editing functions do not include the aria-readonly attribute on any of their elements.

This seems to say that for information content only aria-readonly should not be used.

Can someone please clarify if the MDN documentation is misleading or if my interpretation of the WAI_ARIA is wrong. Thanks

What did you expect to see?

Not sure but an alignment with the WAI-ARIA

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

コントリビューターガイド