Bug 1896047 part 6: Support the CSS attr() function in CssAltContent. r=eeejay
commitb2b99f4e8007c52d2d42b02a1cbf138423e341e9
authorJames Teh <jteh@mozilla.com>
Fri, 17 May 2024 00:24:16 +0000 (17 00:24 +0000)
committerJames Teh <jteh@mozilla.com>
Fri, 17 May 2024 00:24:16 +0000 (17 00:24 +0000)
treef2afef7cf63de4370ec42c88f06e78cb4361dbff
parent6782d3d9fd71fadb4267587fb4154a758b3cc040
Bug 1896047 part 6: Support the CSS attr() function in CssAltContent. r=eeejay

As well as plain strings, alt text items can get their text from an attribute on the Element.
We need to include the values of those attributes when we compute alt text.
In addition, we must watch for changes to these attributes and update the accessibility tree or fire events as necessary.

Differential Revision: https://phabricator.services.mozilla.com/D210018
accessible/base/CssAltContent.cpp
accessible/base/CssAltContent.h
accessible/generic/LocalAccessible.cpp
accessible/tests/browser/tree/browser_css_alt.js
testing/web-platform/meta/accname/name/comp_name_from_content.html.ini