text stringlengths 29 113 | label stringclasses 5
values |
|---|---|
Custom radio control does not expose its selected state | 4.1.2 Name, Role, Value |
Navigation items show no visual change when they receive keyboard focus | 2.4.7 Focus Visible |
Tabbing from the search field moves focus to an unrelated control further down the page | 2.4.3 Focus Order |
The custom checkbox has no visible focus styling | 2.4.7 Focus Visible |
The submit button does not display an outline when focused | 2.4.7 Focus Visible |
Keyboard users cannot operate the carousel controls | 2.1.1 Keyboard |
Keyboard focus on the accordion header is not visually apparent | 2.4.7 Focus Visible |
Keyboard focus on the menu trigger is visually indistinguishable from its default state | 2.4.7 Focus Visible |
Tab order does not follow the visual order of the page | 2.4.3 Focus Order |
Keyboard users cannot close the dialog | 2.1.1 Keyboard |
Table header relationships are lost when the content is accessed with a screen reader | 1.3.1 Info and Relationships |
Form controls are visually grouped under a heading but have no programmatic group relationship | 1.3.1 Info and Relationships |
Opening the menu places focus on content outside the menu | 2.4.3 Focus Order |
Close button is announced without an accessible name | 4.1.2 Name, Role, Value |
Keyboard focus is not visible | 2.4.7 Focus Visible |
The relationship between a form section heading and its controls is only conveyed visually | 1.3.1 Info and Relationships |
Custom control does not respond to keyboard input | 2.1.1 Keyboard |
Menu cannot be opened without using a mouse | 2.1.1 Keyboard |
Custom slider does not expose its current value to assistive technology | 4.1.2 Name, Role, Value |
The focus outline has been removed from links | 2.4.7 Focus Visible |
User must use a mouse to activate the control | 2.1.1 Keyboard |
Drag and drop control provides no keyboard method of operation | 2.1.1 Keyboard |
When tabbing through the form there is no indication of the active field | 2.4.7 Focus Visible |
The selected navigation item and the keyboard-focused navigation item look identical | 2.4.7 Focus Visible |
Table headers are not programmatically associated with their cells | 1.3.1 Info and Relationships |
Date picker can only be operated using a mouse | 2.1.1 Keyboard |
Navigation control can be clicked with a mouse but cannot be activated from the keyboard | 2.1.1 Keyboard |
Combobox does not communicate its role to screen reader users | 4.1.2 Name, Role, Value |
Interactive icon cannot receive keyboard input | 2.1.1 Keyboard |
Content that appears as a numbered list is not programmatically identified as a list | 1.3.1 Info and Relationships |
Tabbing to the search button produces no visible focus indicator | 2.4.7 Focus Visible |
Text is styled to look like a heading but assistive technology identifies it as ordinary text | 1.3.1 Info and Relationships |
Keyboard navigation moves between controls in an illogical sequence | 2.4.3 Focus Order |
Toggle button does not communicate whether it is pressed | 4.1.2 Name, Role, Value |
Menu button does not expose whether the menu is currently open | 4.1.2 Name, Role, Value |
The currently focused control cannot be distinguished from surrounding controls | 2.4.7 Focus Visible |
Interactive icons provide no visible indication when they receive focus | 2.4.7 Focus Visible |
Focus unexpectedly jumps back to the top of the page | 2.4.3 Focus Order |
User cannot select an item from the list using the keyboard | 2.1.1 Keyboard |
Custom dropdown does not expose whether it is expanded or collapsed | 4.1.2 Name, Role, Value |
Tab sequence does not match the logical reading order | 2.4.3 Focus Order |
Visually grouped checkboxes are not contained within a programmatically identified group | 1.3.1 Info and Relationships |
Related form fields are positioned together visually but their relationship cannot be determined programmatically | 1.3.1 Info and Relationships |
The carousel controls receive keyboard focus without displaying a focus indicator | 2.4.7 Focus Visible |
Keyboard users encounter footer links before completing the form | 2.4.3 Focus Order |
Custom checkbox does not expose its checked state to assistive technology | 4.1.2 Name, Role, Value |
Focus styling is missing from the custom dropdown | 2.4.7 Focus Visible |
Button cannot be activated using the Enter or Space key | 2.1.1 Keyboard |
Tooltip trigger cannot be activated from the keyboard | 2.1.1 Keyboard |
Focus moves to controls that are visually positioned later in the interface | 2.4.3 Focus Order |
Focus moves outside the modal while the dialog is still open | 2.4.3 Focus Order |
Interactive icon is announced without its purpose being identified | 4.1.2 Name, Role, Value |
After closing the dialog focus does not return to the control that opened it | 2.4.3 Focus Order |
Interactive chart controls cannot be operated without a pointing device | 2.1.1 Keyboard |
Items in the custom listbox cannot be selected without a mouse | 2.1.1 Keyboard |
Keyboard users cannot visually identify which form field currently has focus | 2.4.7 Focus Visible |
Focus reaches background page controls before the active dialog controls | 2.4.3 Focus Order |
Search icon is exposed as a button but has no accessible name | 4.1.2 Name, Role, Value |
Focus moves through form fields in an unexpected sequence | 2.4.3 Focus Order |
Form fields are visually grouped but the relationship is not available to assistive technology | 1.3.1 Info and Relationships |
Screen reader identifies the interactive element as plain text instead of a button | 4.1.2 Name, Role, Value |
Screen reader does not announce the current value of the custom range control | 4.1.2 Name, Role, Value |
Radio buttons are visually grouped but are not programmatically associated with their group label | 1.3.1 Info and Relationships |
Navigation submenu cannot be expanded using the keyboard | 2.1.1 Keyboard |
Opening the modal does not move focus into the dialog | 2.4.3 Focus Order |
Table cells are not associated with the appropriate row headers | 1.3.1 Info and Relationships |
After submitting the form focus moves to an unrelated navigation item | 2.4.3 Focus Order |
Button has no accessible name | 4.1.2 Name, Role, Value |
Focus moves to the footer before reaching the main content | 2.4.3 Focus Order |
Screen reader does not announce the state of the checkbox | 4.1.2 Name, Role, Value |
Data is arranged visually in rows and columns but no table semantics are provided | 1.3.1 Info and Relationships |
There is no visual indication when a navigation link receives keyboard focus | 2.4.7 Focus Visible |
Headings are visually styled but are not marked up as headings | 1.3.1 Info and Relationships |
Heading structure does not reflect the page hierarchy | 1.3.1 Info and Relationships |
The visual hierarchy of the content is not represented in the page markup | 1.3.1 Info and Relationships |
Expandable navigation control does not communicate its expanded state | 4.1.2 Name, Role, Value |
Screen reader does not identify the custom control as a button | 4.1.2 Name, Role, Value |
Keyboard focus moves behind the open dialog | 2.4.3 Focus Order |
A data table does not identify its column headers programmatically | 1.3.1 Info and Relationships |
Accordion sections cannot be expanded using keyboard controls | 2.1.1 Keyboard |
WCAG Accessibility Issues
A small synthetic dataset for experimenting with machine learning classification of accessibility defects against WCAG success criteria.
This project was created as a learning exercise to explore the complete Hugging Face text-classification workflow, including dataset preparation, tokenisation, fine-tuning a pretrained Transformer model, evaluation and inference.
Dataset
The dataset contains 100 synthetic accessibility defect descriptions across five WCAG success criteria.
Each class contains 20 examples.
| Label | WCAG success criterion |
|---|---|
| 0 | 1.3.1 Info and Relationships |
| 1 | 2.1.1 Keyboard |
| 2 | 2.4.3 Focus Order |
| 3 | 2.4.7 Focus Visible |
| 4 | 4.1.2 Name, Role, Value |
Example:
Custom radio control does not expose its selected state
Label:
4.1.2 Name, Role, Value
All examples are synthetic and were created specifically for this project. The dataset does not contain real audit findings or customer data.
Dataset Splits
The 100 examples are divided using a stratified split:
| Split | Examples | Examples per class |
|---|---|---|
| Training | 80 | 16 |
| Validation | 10 | 2 |
| Test | 10 | 2 |
The original complete dataset is available in data.csv.
split_data.py can be used to reproduce the train, validation and test datasets.
Model Training
The project uses distilbert-base-uncased as the pretrained base model.
DistilBERT is fine-tuned for multiclass sequence classification with five output classes corresponding to the five WCAG success criteria.
The training configuration currently uses:
- 5 epochs
- Batch size of 8
- Learning rate of 2e-5
- Validation after each epoch
- Weighted F1 as the model-selection metric
The training process is implemented in train_model.py.
Initial Results
The initial model achieved:
| Metric | Result |
|---|---|
| Test accuracy | 80% |
| Weighted precision | 0.867 |
| Weighted recall | 0.800 |
| Weighted F1 | 0.787 |
These results are based on a test set containing only 10 examples and should not be interpreted as evidence that the model will achieve 80% accuracy on real-world accessibility defects.
The results demonstrate that the end-to-end classification pipeline is working.
Example Predictions
After fine-tuning, the model correctly classified previously unseen examples such as:
no focus indicator
as:
2.4.7 Focus Visible
and:
can't open menu with keyboard
as:
2.1.1 Keyboard
Repository Files
data.csv— complete synthetic datasettrain.csv— training splitvalidation.csv— validation splittest.csv— held-out test splitsplit_data.py— creates the stratified dataset splitsload_dataset.py— loads the CSV files using Hugging Face Datasetstokenize_dataset.py— tokenises examples and encodes labelsload_model.py— loads DistilBERT for sequence classificationtrain_model.py— fine-tunes and evaluates the classifierpredict.py— performs inference using the trained model
Limitations
This is a small educational dataset rather than a production accessibility dataset.
In particular:
- Only five WCAG success criteria are represented.
- The examples are synthetic.
- There are only 20 examples per class.
- The test set contains only 10 examples.
- Real accessibility defects may be substantially more complex or ambiguous.
- Some accessibility defects can relate to more than one WCAG success criterion.
The classifier is a closed-set classifier. It must select one of its five known classes even when an issue actually belongs to a WCAG criterion that is not represented in the dataset.
For example, an issue concerning missing alternative text would normally relate to 1.1.1 Non-text Content, but the current model has no 1.1.1 class available.
Purpose
The purpose of this project is to learn and demonstrate an end-to-end Hugging Face machine learning workflow:
Dataset
↓
Train / Validation / Test Split
↓
Tokenisation
↓
Pretrained DistilBERT
↓
Fine-tuning
↓
Evaluation
↓
Inference
The project can be extended by adding more examples, introducing additional WCAG success criteria and evaluating the resulting classifier against a larger and more representative test dataset.
- Downloads last month
- 73