Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0acab672f19753e3ab722d303fba8f7b3308b276
      
https://github.com/WebKit/WebKit/commit/0acab672f19753e3ab722d303fba8f7b3308b276
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-10-13 (Tue, 13 Oct 2026)

  Changed paths:
    A 
LayoutTests/accessibility/isolated-tree/mac/select-appearance-switch-expected.txt
    A LayoutTests/accessibility/isolated-tree/mac/select-appearance-switch.html
    A LayoutTests/accessibility/mac/select-appearance-switch-expected.txt
    A LayoutTests/accessibility/mac/select-appearance-switch.html
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityProgressIndicator.h
    M Source/WebCore/accessibility/AccessibilitySlider.h

  Log Message:
  -----------
  AX: an accessibility object keeps its class when the renderer of its element 
changes
https://bugs.webkit.org/show_bug.cgi?id=327214
rdar://189782941

Reviewed by Tyler Wilcock.

AXObjectCache::createObjectFromRenderer() picks the class of an accessibility 
object from the
renderer, and for a select and its options from how the select renders. Objects 
survive renderer
changes, though, so they can end up with a class that no longer fits. A select 
that switched
between a native and a base appearance dropdown box after assistive technology 
accessed it, for
instance because a class or media query applies appearance: base-select, kept 
its objects and
never exposed its base appearance picker. Changing the size or multiple 
attribute of a native
select had the same problem, and an object created before its element had a 
renderer kept the
class it got without one.

Factor the class decision out of createObjectFromRenderer(), and replace an 
object along with the
other deferred renderer changes when its renderer now calls for another class. 
For a select that
includes the objects of its options and optgroups, whose class depends on the 
select. When the
replaced object had focus, move the focus to the new object, so that assistive 
technology is told.

Tests: accessibility/isolated-tree/mac/select-appearance-switch.html
       accessibility/mac/select-appearance-switch.html

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to