[webkit-changes] [WebKit/WebKit] bc6b70: AX: Computed role of role="form" and role="region"...

Tyler Wilcock noreply at github.com
Mon Sep 18 11:00:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bc6b70cc4367bc6b93426391045429e429382014
      https://github.com/WebKit/WebKit/commit/bc6b70cc4367bc6b93426391045429e429382014
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    A LayoutTests/accessibility/role-form-and-region-dynamic-label-expected.txt
    A LayoutTests/accessibility/role-form-and-region-dynamic-label.html
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp

  Log Message:
  -----------
  AX: Computed role of role="form" and role="region" elements does not dynamically update when label changes
https://bugs.webkit.org/show_bug.cgi?id=261646
rdar://problem/115608740

Reviewed by Chris Fleizach.

https://w3c.github.io/aria/#document-handling_author-errors_roles

>  In situations where an author has not specified names for these landmarks (form and region), it is considered
>  an authoring error. The user agent MUST treat such elements as if no role had been provided.

When aria-label and aria-labelledby update dynamically, we need to make sure we still follow this rule.
This patch fixes that.

* LayoutTests/accessibility/role-form-and-region-dynamic-label-expected.txt: Added.
* LayoutTests/accessibility/role-form-and-region-dynamic-label.html: Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAriaRoleAttribute const):

Canonical link: https://commits.webkit.org/268087@main




More information about the webkit-changes mailing list