Skip to content

Add accessibility linter to web console #6849

Closed

Description

@benjaminapetersen

I propose we add an accessibility linter tool like grunt-accessibilty or grunt-arialinter to the web console to assist us in following accessibility best practices. This could help us reduce time spent manually combing forms, etc for accessibility & avoid errors as the app evolves.

@spadgett @jwforres @sg00dwin thoughts? I am not super familiar with either of these, but they look like a good starting point.

Activity

  1. changed the title [-]Add [/-] [+]Add accessibility linter to web console[/+] on Jan 27, 2016
  2. spadgett commented on Jan 27, 2016

    @spadgett
    Member

    How noisy is the output?

    Accessibility is easy to forget about and hard to get right, so something like this might really help.

  3. jwforres commented on Jan 27, 2016

    @jwforres
    Member

    neither of those look like they will really help us when a lot of our ARIA states are dependent on runtime state. both of those look like they only run against static HTML files

  4. benjaminapetersen commented on Jan 27, 2016

    @benjaminapetersen
    ContributorAuthor

    I doubt they will cover everything, but if we at least get our static linted, I'm sure it will improve the overall accessibility of the app. Its just so easy to forget/fix/break/fix/break-again this kind of thing that I think anything that helps may be worth our time.

  5. jwforres commented on Nov 16, 2016

    @jwforres
    Member

    grunt-arialinter is no longer supported, so thats definitely out

  6. jwforres commented on Nov 16, 2016

    @jwforres
    Member

    So I ran grunt-accessibility with these options:

        accessibility: {
          options: {
            accessibilityLevel: 'WCAG2A',
            ignore: [
              // ERROR: A title should be provided for the document, using a non-empty title element in the head section.
              // Reason ignored: Not valid when testing templates
              'WCAG2A.Principle2.Guideline2_4.2_4_2.H25.1.NoTitleEl',
              // ERROR: The html element should have a lang or xml:lang attribute which describes the language of the document.
              // Reason ignored: Not valid when testing templates
              'WCAG2A.Principle3.Guideline3_1.3_1_1.H57.2',
              // ERROR: This fieldset element does not have a name available to an accessibility API. Valid names are: legend element.
              // Reason ignored: We use fieldsets as groupings for disabling inputs, not as a visually grouped set of elements
              'WCAG2A.Principle4.Guideline4_1.4_1_2.H91.Fieldset.Name',
              // ERROR: Fieldset does not contain a legend element. All fieldsets should contain a legend element that describes a description of the field group.
              // Reason ignored: We use fieldsets as groupings for disabling inputs, not as a visually grouped set of elements
              'WCAG2A.Principle1.Guideline1_3.1_3_1.H71.NoLegend'
            ],
            reportLevels: {
              notice: false,
              warning: false,
              error: true
            }
          },
          test: {
            src: ['<%= yeoman.app %>/views/**/*.html']
          }
        }

    So this is just reporting error level stuff, no warnings or notices, and I even ignored 4 of the rules, this is where we are at right now https://gist.github.com/jwforres/1732025a341374415e5ab0eed70bd6b5

    Until we resolve all of those issues, we can't turn the linter on as part of our test process. I'm going to close this issue and track it this as part of the existing accessibility checklist instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions