Module Expr Str Import alias ImportFrom alias alias alias ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Raise Call NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Raise Call NameLoad Str decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad vararg kwarg body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad NameLoad orelse With Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str NameStore body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list NameLoad NameLoad decorator_list
N/A N/A 
Interface for running accessibility audits on a PageObject.
 N/A os abc abstractmethod abstractproperty ABCMeta AccessibilityError N/A Exception N/A N/A 
    The page violates one or more accessibility rules.
     N/A N/A A11yAuditConfigError N/A Exception N/A N/A 
    An error in A11yAuditConfig.
     N/A N/A A11yAuditConfig N/A object N/A N/A 
    The `A11yAuditConfig` object defines the options available in an
    accessibility ruleset.
     N/A __metaclass__ ABCMeta __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super A11yAuditConfig self __init__ args kwargs N/A N/A self rules_file None N/A set_rules_file N/A N/A self path N/A None N/A N/A 
        Sets `self.rules_file` to the passed file.

        Args:
            A filepath where the JavaScript for the ruleset can be found.

        This is intended to be used in the case of using an extended or
        modified version of the ruleset. The interface and response
        format are expected to be unmodified.
         N/A path N/A N/A N/A self rules_file N/A N/A N/A os path abspath path N/A set_rules N/A N/A self rules N/A N/A N/A 
        Overrides the default rules to be run.

        Raises:

            `NotImplementedError` if this isn't overwritten in the ruleset
                specific implementation.
         N/A N/A NotImplementedError The ability to specify rules has not been implemented. N/A abstractmethod set_scope N/A N/A self include exclude N/A None None N/A N/A 
        Overrides the default scope (part of the DOM) to inspect.

        Raises:

            `NotImplementedError` if this isn't overwritten in the ruleset
                specific implementation.
         N/A N/A NotImplementedError The ability to specify scope has not been implemented. N/A abstractmethod customize_ruleset N/A N/A self custom_ruleset_file N/A None N/A N/A 
        Allows customization of the ruleset. (e.g. adding custom rules,
        extending the implementation of an existing rule.)

        Raises:

            `NotImplementedError` if this isn't overwritten in the ruleset
                specific implementation.
         N/A N/A NotImplementedError The ability to customize the ruleset has not been implemented. N/A abstractmethod N/A A11yAudit N/A object N/A N/A 
    Allows auditing of a page for accessibility issues.

    The ruleset to use can be specified by the environment variable
    `BOKCHOY_A11Y_RULESET`. Currently, there are two ruleset implemented:

    `axe_core`:

        * Ruleset class: AxeCoreAudit
        * Ruleset config: AxeCoreAuditConfig
        * This is default ruleset.

    `google_axs`:

        * Ruleset class: AxsAudit
        * Ruleset config: AxsAuditConfig
     N/A __metaclass__ ABCMeta __init__ N/A N/A self browser url config N/A None args kwargs N/A N/A 
        Sets ruleset to be used.

        Args:
            browser: A browser instance
            url: URL of the page to test
            config: (optional) A11yAuditConfig or subclass of A11yAuditConfig
         N/A N/A N/A N/A super A11yAudit self __init__ args kwargs N/A N/A self url url N/A N/A self browser browser N/A N/A self config N/A config N/A self default_config N/A _get_rules_js N/A N/A self N/A N/A N/A 
        Checks that the rules file for the enabled ruleset exists
        and returns its contents as string.

        Raises: `RuntimeError` if the file isn't found.
         N/A N/A N/A N/A N/A os path isfile N/A N/A self config rules_file N/A N/A msg N/A N/A Could not find the accessibility tools JS file: {} format N/A N/A self config rules_file N/A N/A RuntimeError msg N/A N/A N/A open N/A N/A self config rules_file r rules_file N/A N/A N/A N/A rules_file read N/A do_audit N/A N/A self N/A N/A N/A 
        Audit the page for accessibility problems using the enabled ruleset.

        Returns:
            A list (one for each browser session) of results returned from
            the audit. See documentation of `_check_rules` in the enabled
            ruleset for the format of each result.
         N/A rules_js N/A N/A self _get_rules_js N/A audit_results N/A N/A self _check_rules N/A self browser rules_js N/A self config N/A audit_results N/A check_for_accessibility_errors N/A N/A self N/A N/A N/A 
        Run an accessibility audit, parse the results, and raise a single
        exception if there are violations.

        Note that an exception is only raised on errors, not on warnings.

        Returns:

            None

        Raises:

            AccessibilityError
         N/A audit_results N/A N/A self do_audit N/A audit_results N/A N/A N/A N/A self report_errors audit_results N/A self url N/A default_config N/A N/A self N/A N/A N/A 
        Return an instance of a subclass of A11yAuditConfig.
         N/A N/A NotImplementedError default_config has not been implemented N/A abstractproperty _check_rules N/A N/A browser rules_js config N/A N/A N/A 
        Run an accessibility audit on the page using the implemented ruleset.

        Args:

            browser: a browser instance.
            rules_js: the ruleset JavaScript as a string.
            config: an AxsAuditConfig instance.

        Returns:

            A list of violations.

        Raises:

            `NotImplementedError` if this isn't overwritten in the ruleset
                specific implementation.
         N/A N/A NotImplementedError _check_rules has not been implemented N/A staticmethod abstractmethod report_errors N/A N/A audit url N/A N/A N/A 
        Args:

            audit: results of an accessibility audit.
            url: the url of the page being audited.

        Raises:

            `AccessibilityError` if errors are found in the audit.
            `NotImplementedError` if this isn't overwritten in the ruleset
                specific implementation.
         N/A N/A NotImplementedError report_errors has not been implemented N/A staticmethod abstractmethod N/A