Files
servo/components/script/dom/html/mod.rs
Martin Robinson a48bef2316 script: Add support for the accesskey attribute (#43031)
This change adds support for the `accesskey` HTML attribute the
corresponding behavior defined by the HTML standard. In addition to a
new map holding a mapping between access key characters and a rooted
reference to elements that use them, it adds a struct to represent the
"Command" concept from the specification [^1], which seems to be used
for `accesskey`. Not all command facets are implemented as some seem to
be unused in the specification.

[^1]:
https://html.spec.whatwg.org/multipage/interactive-elements.html#commands

Testing: This causes most access key tests to start passing. One test
now
only partially completes, because of a bug in the way that we fire
synthetic
mouse events.
Fixes: This is part of #25001.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-03-06 14:22:54 +00:00

83 lines
2.8 KiB
Rust

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
pub(crate) mod htmlanchorelement;
pub(crate) mod htmlareaelement;
pub(crate) mod htmlaudioelement;
pub(crate) mod htmlbaseelement;
pub(crate) mod htmlbodyelement;
pub(crate) mod htmlbrelement;
pub(crate) mod htmlbuttonelement;
#[expect(dead_code)]
pub(crate) mod htmlcanvaselement;
pub(crate) mod htmlcollection;
pub(crate) mod htmldataelement;
pub(crate) mod htmldatalistelement;
pub(crate) mod htmldetailselement;
pub(crate) mod htmldialogelement;
pub(crate) mod htmldirectoryelement;
pub(crate) mod htmldivelement;
pub(crate) mod htmldlistelement;
pub(crate) mod htmldocument;
pub(crate) mod htmlelement;
pub(crate) mod htmlembedelement;
pub(crate) mod htmlfieldsetelement;
pub(crate) mod htmlfontelement;
pub(crate) mod htmlformcontrolscollection;
pub(crate) mod htmlformelement;
pub(crate) mod htmlframeelement;
pub(crate) mod htmlframesetelement;
pub(crate) mod htmlheadelement;
pub(crate) mod htmlheadingelement;
pub(crate) mod htmlhrelement;
pub(crate) mod htmlhtmlelement;
pub(crate) mod htmlhyperlinkelementutils;
pub(crate) mod htmliframeelement;
pub(crate) mod htmlimageelement;
pub(crate) mod htmlinputelement;
pub(crate) mod htmllabelelement;
pub(crate) mod htmllegendelement;
pub(crate) mod htmllielement;
pub(crate) mod htmllinkelement;
pub(crate) mod htmlmapelement;
pub(crate) mod htmlmediaelement;
pub(crate) mod htmlmenuelement;
pub(crate) mod htmlmetaelement;
pub(crate) mod htmlmeterelement;
pub(crate) mod htmlmodelement;
pub(crate) mod htmlobjectelement;
pub(crate) mod htmlolistelement;
pub(crate) mod htmloptgroupelement;
pub(crate) mod htmloptionelement;
pub(crate) mod htmloptionscollection;
pub(crate) mod htmloutputelement;
pub(crate) mod htmlparagraphelement;
pub(crate) mod htmlparamelement;
pub(crate) mod htmlpictureelement;
pub(crate) mod htmlpreelement;
pub(crate) mod htmlprogresselement;
pub(crate) mod htmlquoteelement;
#[expect(dead_code)]
pub(crate) mod htmlscriptelement;
pub(crate) mod htmlselectelement;
pub(crate) mod htmlslotelement;
pub(crate) mod htmlsourceelement;
pub(crate) mod htmlspanelement;
pub(crate) mod htmlstyleelement;
pub(crate) mod htmltablecaptionelement;
pub(crate) mod htmltablecellelement;
pub(crate) mod htmltablecolelement;
pub(crate) mod htmltableelement;
pub(crate) mod htmltablerowelement;
pub(crate) mod htmltablesectionelement;
pub(crate) mod htmltemplateelement;
pub(crate) mod htmltextareaelement;
pub(crate) mod htmltimeelement;
pub(crate) mod htmltitleelement;
pub(crate) mod htmltrackelement;
pub(crate) mod htmlulistelement;
pub(crate) mod htmlunknownelement;
pub(crate) mod htmlvideoelement;
pub(crate) mod interactive_element_command;