Skip to content

Update FieldInput aria #9656

@maribethb

Description

@maribethb

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

No response

Request

FieldInput will be set up to provide a strong foundation for ARIA support in implementation classes by:
Introducing automatic mechanisms to ensure that FieldInputs have a reasonable default role and up-to-date label.
Relying on implementations to provide accessible editor support.

The former is done by introducing a new private recomputeAriaLabel() helper that:
Sets the main focusable element's role to aria.Role.BUTTON (see section 2).
Sets the main focusable element's aria-label to the result of computeAriaLabel (without type information by default).
Sets the main focusable element to aria-hidden if it's part of the flyout (no fields should be part of the accessibility node tree in that case since they're not navigable).

FieldInput will also be configured to automatically recompute its aria-label when:
The field is first initialized (initView is called).
When a valid value is updated in the field (doValueUpdate_).
When an invalid value is attempted to be set and triggers a revert (doValueInvalid_).

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExternal contributions actively solicitedissue: feature requestDescribes a new feature and why it should be addedissue: triageIssues awaiting triage by a Blockly team member

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions