The popoverTargetElement seems to be one of the only cases of a
reflected Element? attribute in the HTML spec, the behaviour of which
is specified in section 2.6.1.
Buttons can't actually toggle popovers yet because showing/hiding
popovers is not implemented yet.
Additionally: For “img” elements with empty “alt” attributes, change the
default role to the newer, preferred “none” synonym for the older
“presentation” role; import https://wpt.fyi/results/html-aam/roles.html
(which provides test/regression coverage for these changes).
Currently, the following JS snippet will hang indefinitely:
new DOMParser().parseFromString("<object>", "text/html");
Because the document into which the object is inserted is not active. So
the task queued to run the representation steps will never run.
This patch implements the spec steps to rerun the representation steps
when the active state changes, and avoid the hang when the object is
created in an inactive document.
This change aligns the default roles for “th” and “td” elements with the
requirements in the HTML-AAM spec, and with the corresponding WPT tests
at https://wpt.fyi/results/html-aam/table-roles.html, and with the
behavior in other engines.
Otherwise, without this change, the default role values for “th” and
“td” elements in some cases don’t match the behavior in other engines,
and don’t match the expected results for the corresponding WPT tests.
This change makes Ladybird conform to the current requirements at
https://w3c.github.io/core-aam/#roleMappingComputedRole in the “Core
Accessibility API Mappings” spec for the case of “orphaned” li elements;
that is, any li element which doesn’t have a role=list ancestor.
The core-aam spec requires that in such cases, the li element must not
be assigned the “listitem” role but instead must be treated as if it had
no role at all.
This patch ensure Headers object's associated header list
is ISO-8859-1 encoded when set using `Infra::isomorphic_encode`,
and correctly decoded using `Infra::isomorphic_decode`.
Follow-up of https://github.com/LadybirdBrowser/ladybird/pull/1893
This eliminates the use of ResourceLoader in HTMLObjectElement. The spec
steps around fetching have been slightly updated since we've last looked
at this, so those are updated here.
Regarding the text test change: we cannot rely on the data: URL being
fetched synchronously. It will occur on a deferred task now. This does
match the behavior of other browsers, as they also will not have run the
fallback representation steps as of DOMContentLoaded.
Previously, imported WPT tests didn't display any output if the
internals object was exposed. This change adds the condition that the
browser must also be running headlessly for test output to not be
displayed.
The WebIDL for the `Headers` constructor specifies that the `init`
parameter is optional and must be of type `HeadersInit`. While the
parameter can be omitted (or explicitly set to `undefined`),
`null` is not a valid value.
This change fixes at least 2 "Create headers with null should throw"
WPT subtests which I have imported in this patch.
It is the responsibility of code that deals with TypedArrays to apply
the byte offset and byte length. Not doing this caused Unity Web to
crash, as they call getRandomValues with views into their full main
memory. Previously, it would fill their entire memory of about 33.5 MB
with random bytes.
Add support for shared memory creation in WebAssembly memory API.
This API is needed for WPT tests that use shared array buffers.
Import related WPT tests.
This change imports the https://wpt.live/accname/basic.html — which we
had overlooked earlier when importing all the other WPT accname tests.
(Note that this one of the six upstream WPT tests that directly call
test_driver.get_computed_label(element) — and so that we’d otherwise
need to patch our copy of, if we weren’t patching it in testdriver.js).
This change takes the change we made in 120bc52f23 to patch the imported
WPT aria-utils.js file to use our window.internals.getComputedLabel(el)
function, and moves that patching into the imported WPT testdriver.js
file — in the same way we did in c5966bbdcb.
That centralizes the patching, and avoids the need to patch multiple
other WPT tests we’re likely to import eventually. There are actually
six different WPT test files upstream which we haven’t imported yet that
call window.test_driver_internal.get_computed_label(el) directly — and
that, without this change, we’d otherwise end up needing to patch.
This change implements spec-conformant computation of default ARIA roles
for elements whose expected default role depends on the element’s
context — specifically, either on the element’s ancestry, or on whether
the element has an accessible name, or both. This affects the “aside”,
“footer”, “header”, and “section” elements.
Otherwise, without this change, “aside”, “footer”, “header”, and
“section” elements may unexpectedly end up with the wrong default roles.
This change adds a window.internals.getComputedLabel(element) function,
for use in testing ARIA-related behavior. It also patches the imported
WPT testdriver.js script’s test_driver.get_computed_role(element)
function to call our window.internals.getComputedRole(element) function.