/* 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 http://mozilla.org/MPL/2.0/. */ "use strict"; /** * Checks functionality around text label audit for the AccessibleActor. */ const { accessibility: { AUDIT_TYPE: { TEXT_LABEL }, SCORES: { BEST_PRACTICES, FAIL, WARNING }, ISSUE_TYPE: { [TEXT_LABEL]: { DIALOG_NO_NAME, DOCUMENT_NO_TITLE, EMBED_NO_NAME, FIGURE_NO_NAME, FORM_FIELDSET_NO_NAME, FORM_FIELDSET_NO_NAME_FROM_LEGEND, FORM_NO_NAME, FORM_NO_VISIBLE_NAME, FORM_OPTGROUP_NO_NAME_FROM_LABEL, HEADING_NO_CONTENT, HEADING_NO_NAME, IFRAME_NO_NAME_FROM_TITLE, IMAGE_NO_NAME, INTERACTIVE_NO_NAME, MATHML_GLYPH_NO_NAME, TOOLBAR_NO_NAME, }, }, }, } = require("resource://devtools/shared/constants.js"); add_task(async function () { const { target, walker, a11yWalker, parentAccessibility } = await initAccessibilityFrontsForUrl( `${MAIN_DOMAIN}doc_accessibility_text_label_audit.html` ); const tests = [ ["Button menu with inner content", "#buttonmenu-1", null], ["Button menu nested inside a