GSA / notifications-admin

The UI of Notify.gov
https://notify.gov
Other
11 stars 2 forks source link

fix moderate accessibility violations found by axe-core #1937

Open terrazoon opened 1 month ago

terrazoon commented 1 month ago

Once fixed (assuming the ticket for serious violations is fixed as well), go into end_to_end_tests/conftest.py and lower the setting for the axe-core tests to 'moderate'.

Accessibility violation: {'id': 'region', 'impact': 'moderate', 'tags': ['cat.keyboard', 'best-practice'], 'description': 'Ensures all page content is contained by landmarks', 'help': 'All page content should be contained by landmarks', 'helpUrl': 'https://dequeuniversity.com/rules/axe/4.4/region?application=axeAPI', 'nodes': [{'any': [{'id': 'region', 'data': {'isIframe': False}, 'relatedNodes': [], 'impact': 'moderate', 'message': 'Some page content is not contained by landmarks'}], 'all': [], 'none': [], 'impact': 'moderate', 'html': '

', 'target': ['.navigation-service'], 'failureSummary': 'Fix any of the following:\n Some page content is not contained by landmarks'}, {'any': [{'id': 'region', 'data': {'isIframe': False}, 'relatedNodes': [], 'impact': 'moderate', 'message': 'Some page content is not contained by landmarks'}], 'all': [], 'none': [], 'impact': 'moderate', 'html': '
', 'target': ['.tablet\:grid-col-2'], 'failureSummary': 'Fix any of the following:\n Some page content is not contained by landmarks'}]}

terrazoon commented 3 weeks ago

I'm completing this PR here: https://github.com/GSA/notifications-admin/pull/1963 which addresses 4 or 5 violations.

The remaining violations are related to the Back button in various places and @jonathanbobel has agreed to look at those as they might require more finesse.

To see the errors:

  1. go to tests/end_to_end_tests/conftest.py and modify check_axe_report() so it does not ignore moderate violations.

  2. run the e2e tests either locally, or by pushing a commit to GitHub. You should see 4 violations all involving Back buttons.

  3. address as needed and keep running e2e tests until they pass with your changes.