tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ARIAStateMap.h (1549B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef _mozilla_a11y_aria_ARIAStateMap_h_
      8 #define _mozilla_a11y_aria_ARIAStateMap_h_
      9 
     10 #include <stdint.h>
     11 
     12 namespace mozilla {
     13 
     14 namespace dom {
     15 class Element;
     16 }
     17 
     18 namespace a11y {
     19 namespace aria {
     20 
     21 /**
     22 * List of the ARIA state mapping rules.
     23 */
     24 enum EStateRule {
     25  eARIANone,
     26  eARIAAutoComplete,
     27  eARIABusy,
     28  eARIACheckableBool,
     29  eARIACheckableMixed,
     30  eARIACheckedMixed,
     31  eARIACurrent,
     32  eARIADisabled,
     33  eARIAExpanded,
     34  eARIAHasPopup,
     35  eARIAInvalid,
     36  eARIAModal,
     37  eARIAMultiline,
     38  eARIAMultilineByDefault,
     39  eARIAMultiSelectable,
     40  eARIAOrientation,
     41  eARIAPressed,
     42  eARIAReadonly,
     43  eARIAReadonlyOrEditable,
     44  eARIARequired,
     45  eARIASelectable,
     46  eARIASelectableIfDefined,
     47  eReadonlyUntilEditable,
     48  eIndeterminateIfNoValue,
     49  eFocusableUntilDisabled
     50 };
     51 
     52 /**
     53 * Expose the accessible states for the given element accordingly to state
     54 * mapping rule.
     55 *
     56 * @param  aRule     [in] state mapping rule ID
     57 * @param  aElement  [in] node of the accessible
     58 * @param  aState    [in/out] accessible states
     59 * @return            true if state map rule ID is valid
     60 */
     61 bool MapToState(EStateRule aRule, dom::Element* aElement, uint64_t* aState);
     62 
     63 }  // namespace aria
     64 }  // namespace a11y
     65 }  // namespace mozilla
     66 
     67 #endif