google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.51k stars 3.72k forks source link

ARIA for fields in core Blockly #8205

Open rachel-fenichel opened 5 months ago

rachel-fenichel commented 5 months ago

Check for duplicates

Problem

ARIA defines roles, states, and properties. These expose information to a browser's accessibility API, which sets which information is exposed to the user through their screen reader when they move to an individual DOM element.

This issue does not include:

Request

For each field in core Blockly:

Sub-issues:

Keyboard shortcuts

We will want to support the correct keyboard shortcuts for moving into and out of editing mode when on a single instance of the field (e.g. enter, space, and esc). This work may land in the keyboard nav experimentation code or in core during development, and will likely require refactoring after a period of experimentation.

Describing the correct keyboard shortcut behaviour is a part of the work tracked in this bug, although implementation may not be.

In addition, we will need to provide APIs as needed for custom fields to support shared keyboard shortcuts (enter, space, escape).

Alternatives considered

No response

Additional context

This is a parent issue for ARIA in fields. Information related to individual fields, such as discussion of the correct behaviour for a specific field, should be tracked in sub-issues.

Information related to all fields can be tracked here.

rachel-fenichel commented 5 months ago

Any field with a validator may require input assistance. This should be as consistent as possible across all of our fields, so it may need to be implemented at a higher level instead of per-field.