Skip to content

feat: Added support for custom input ARIA labels#9789

Open
lizschwab wants to merge 3 commits intoRaspberryPiFoundation:v13from
lizschwab:rpf-9752-2
Open

feat: Added support for custom input ARIA labels#9789
lizschwab wants to merge 3 commits intoRaspberryPiFoundation:v13from
lizschwab:rpf-9752-2

Conversation

@lizschwab
Copy link
Copy Markdown
Contributor

The basics

  • I [validated my changes]

The details

Resolves

Fixes #9752

Proposed Changes

Adds a method to set a custom ARIA label to inputs when creating from javascript or when creating from JSON along with support for using that ARIA label if available or using the default if unavailable.

Reason for Changes

This allows developers to set their own ARIA labels for inputs when creating blocks.

Test Coverage

Unit tests are included. Manual testing was performed by updating the blocks defined in the playground and ensuring they are assigned the correct ARIA labels.

@lizschwab lizschwab requested a review from a team as a code owner April 30, 2026 23:25
@lizschwab lizschwab requested a review from maribethb April 30, 2026 23:26
@github-actions github-actions Bot added the PR: feature Adds a feature label Apr 30, 2026
this.bubble.focusableElement.getAttribute('role'),
'group',
);
suite('Input', function () {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we consider moving this to a new ARIA suite at the bottom of input_test instead of here? The existing suite above is here because this block is all nested under Block>Icon management>Warning Icons.
I'm also considering moving the above suite to new file specifically for warnings, but I don't think you need to worry about that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, gotcha. I didn't notice where this was nested, just that it was the only ARIA test group I found. I'll move it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature Adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants