HTTPArchive / legacy.httparchive.org

<<THIS REPOSITORY IS DEPRECATED>> The HTTP Archive provides information about website performance such as # of HTTP requests, use of gzip, and amount of JavaScript. This information is recorded over time revealing trends in how the Internet is performing. Built using Open Source software, the code and data are available to everyone allowing researchers large and small to work from a common base.
https://legacy.httparchive.org
Other
328 stars 84 forks source link

A11Y custom metrics #184

Closed foxdavidj closed 4 years ago

foxdavidj commented 4 years ago

Added metrics to detect the following:

Metric in a11y prop Used for
tables Tables with caption elements
file_extension_alts Alt text that ends in an image extension
title_and_alt How often is the title attribute with the alt attribute in the same element
no_destination_anchors \<a> elements with an href value of: nothing, #, or javascript:void
th_with_scope_attribute How many \<th> elements specify the scope attribute (col or row)
tables.total_with_presentational how many tables are marked as a presentational
total_anchors_with_role_button \<a> elements with role=”button”
total_role_tab_with_selected_and_controls Elements with role="tab", aria-selected and aria-controls attributes
placeholder_but_no_label Form controls with a non-empty placeholder attribute but no label element, aria-labelledby or aria-labelelement
divs_or_spans_as_button_or_link divs/spans with a role=”button” or role=”link”
does_page_use_sr_only_classes Does a page use the css class sr-only or visually-hidden
td_with_headers_attribute how many \<td> elements have a headers attribute

Still in progress

Progress on https://github.com/HTTPArchive/almanac.httparchive.org/issues/907

foxdavidj commented 4 years ago

@rviscomi This is now ready for review. I have unit tested each metric to be working correctly. I'll start running the script on WPT now

foxdavidj commented 4 years ago

Here are the results from WPT. All green lights are go.

https://docs.google.com/spreadsheets/d/1yzJJYZYkGuQDLaruj5cd18VSuhYHExk5u94KkSB8y28/edit?usp=sharing