Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  browser_rootgroup.js   Sprache: JAVA

 
/* 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";

/**
 * Test document with body[role=application] and a top-level group
 */

addAccessibleTask(
  `<div role="grouping" id="group"><p>hello</p><p>world</p></div>`,
  async (browser, accDoc) => {
    let doc = accDoc.nativeInterface.QueryInterface(
      Ci.nsIAccessibleMacInterface
    );

    is(
      doc.getAttributeValue("AXRole"),
      "AXWebArea",
      "doc still has web area role"
    );
    is(
      doc.getAttributeValue("AXRoleDescription"),
      "HTML Content",
      "doc has correct role description"
    );
    ok(
      !doc.attributeNames.includes("AXSubrole"),
      "sub role not available on web area"
    );

    let rootGroup = doc.getAttributeValue("AXChildren")[0];
    is(
      rootGroup.getAttributeValue("AXIdentifier"),
      "root-group",
      "Is generated root group"
    );
    is(
      rootGroup.getAttributeValue("AXRole"),
      "AXGroup",
      "root group has AXGroup role"
    );
    is(
      rootGroup.getAttributeValue("AXSubrole"),
      "AXLandmarkApplication",
      "root group has application subrole"
    );
    is(
      rootGroup.getAttributeValue("AXRoleDescription"),
      "application",
      "root group has application role description"
    );
  },
  { contentDocBodyAttrs: { role: "application" } }
);

/**
 * Test document with dialog role and heading
 */

addAccessibleTask(
  `<body role="dialog" aria-labelledby="h">
    <h1 id="h">
      We're building a richer search experience
    </h1>
  </body>`,
  async (browser, accDoc) => {
    let doc = accDoc.nativeInterface.QueryInterface(
      Ci.nsIAccessibleMacInterface
    );
    let docChildren = doc.getAttributeValue("AXChildren");
    is(docChildren.length, 1, "The document contains a root group");

    let rootGroup = docChildren[0];
    is(
      rootGroup.getAttributeValue("AXIdentifier"),
      "root-group",
      "Is generated root group"
    );

    is(rootGroup.getAttributeValue("AXRole"), "AXGroup""Inherits role");

    is(
      rootGroup.getAttributeValue("AXSubrole"),
      "AXApplicationDialog",
      "Inherits subrole"
    );
    let rootGroupChildren = rootGroup.getAttributeValue("AXChildren");
    is(rootGroupChildren.length, 1, "Root group has one child");

    is(
      rootGroupChildren[0].getAttributeValue("AXRole"),
      "AXHeading",
      "Heading is child of root group"
    );

    // From bottom-up
    let heading = getNativeInterface(accDoc, "h");
    rootGroup = heading.getAttributeValue("AXParent");
    is(
      rootGroup.getAttributeValue("AXIdentifier"),
      "root-group",
      "Parent is generated root group"
    );
  }
);

Messung V0.5
C=95 H=95 G=94

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge