Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 580b36ace139d5b3f64536f83e702e7f9e069af2
      
https://github.com/WebKit/WebKit/commit/580b36ace139d5b3f64536f83e702e7f9e069af2
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    A LayoutTests/accessibility/detected-form-error-message-hidden-expected.txt
    A LayoutTests/accessibility/detected-form-error-message-hidden.html
    M LayoutTests/accessibility/detected-form-error-message-replaced.html
    A 
LayoutTests/accessibility/isolated-tree/detected-form-error-message-hidden-expected.txt
    A 
LayoutTests/accessibility/isolated-tree/detected-form-error-message-hidden.html
    M 
LayoutTests/accessibility/isolated-tree/detected-form-error-message-replaced.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h

  Log Message:
  -----------
  AX Error Detection: A field keeps reporting a detected form error after the 
page hides the message
https://bugs.webkit.org/show_bug.cgi?id=325453
rdar://188552335

Reviewed by Dominic Mazzoni.

messageIsEmpty() only checked that the message was still in the document and 
had non-whitespace
text content, so a message the page had hidden still counted. Pages commonly 
withdraw a message by
hiding it rather than emptying it. Bootstrap's .invalid-feedback goes 
display:none once .is-invalid
is removed from the field, and other sites keep the message's space with 
visibility:hidden. After
the user corrected such a field, it went on reporting invalid, was still 
offered as a field with
an error, and its error message was text that was no longer on screen.

Fix this by only counting text that is rendered and visible. Checking the 
renderers of the text,
rather than of the message element, covers display:none on the message or any 
of its ancestors,
and also a display:contents wrapper, which has no renderer of its own but whose 
text is rendered.
Showing the message again restores the error, as writing text back into an 
emptied message
already does.

* LayoutTests/accessibility/detected-form-error-message-hidden-expected.txt: 
Added.
* LayoutTests/accessibility/detected-form-error-message-hidden.html: Added.
* LayoutTests/accessibility/detected-form-error-message-replaced.html:
* 
LayoutTests/accessibility/isolated-tree/detected-form-error-message-hidden-expected.txt:
 Added.
* 
LayoutTests/accessibility/isolated-tree/detected-form-error-message-hidden.html:
 Added.
* 
LayoutTests/accessibility/isolated-tree/detected-form-error-message-replaced.html:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::messageIsEmpty):
* Source/WebCore/accessibility/AXObjectCache.h:

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



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

Reply via email to