[wp-trac] [WordPress Trac] #63199: Allow to control aria-live attribute in settings_errors()
WordPress Trac
noreply at wordpress.org
Sun Mar 30 16:48:48 UTC 2025
#63199: Allow to control aria-live attribute in settings_errors()
--------------------------+--------------------------------
Reporter: andremenrath | Owner: joedolson
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.9
Component: General | Version: 3.0
Severity: normal | Resolution:
Keywords: | Focuses: ui, accessibility
--------------------------+--------------------------------
Changes (by joedolson):
* owner: (none) => joedolson
* status: new => accepted
* version: 6.3.2 => 3.0
* milestone: Awaiting Review => 6.9
Comment:
This is effectively a subset of the issue noted in #50486. This could be
somewhat helped by adding `role="alert"`, which can be used at initial
load to trigger a notice being read. However, that is not reliable; the
alert role is intended to be equivalent to `aria-live="assertive"`, and is
not intended by design to be read on page load, though some screen readers
do.
What probably does make sense is for `add_settings_error()` to support all
the same parameters already supported in `wp_admin_notice()`, and to use
those functions to print output. This would also have the advantage that
settings errors would be filterable.
I'm also noting that the output of added settings errors in
`settings_errors()` wraps the message text in `strong` elements, which is
not something we want, per the recently closed #50402.
This dates back to the addition of the function in version 3.0.0.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63199#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list