Skip to content

feat: allow translated field labels, add docs#10174

Merged
maribethb merged 2 commits into
RaspberryPiFoundation:mainfrom
maribethb:aria-docs
Jul 23, 2026
Merged

feat: allow translated field labels, add docs#10174
maribethb merged 2 commits into
RaspberryPiFoundation:mainfrom
maribethb:aria-docs

Conversation

@maribethb

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #10167

Proposed Changes

  • Modifies the setAriaTypeName method to allow passing message references (same as what inputs allow), and updates the config object to go through this method as well
  • adds the ariaLabelText property to the json block definition types for inputs
  • adds tests for setting the aria label text for inputs through json block definition
  • adds tests for setting message references in the field type name
  • adds documentation for configuring labels and roles for inputs, fields, and blocks

Reason for Changes

  • makes accessibility labels better
  • documents so people know how to use

Test Coverage

added

Documentation

this is that

Additional Information

@maribethb
maribethb requested a review from a team as a code owner July 23, 2026 16:52
@maribethb
maribethb requested a review from gonfunko July 23, 2026 16:52
@github-actions github-actions Bot added the PR: feature Adds a feature label Jul 23, 2026
Comment thread packages/docs/docs/guides/create-custom-blocks/define/structure-js.mdx Outdated

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.

Would be nice for this to be an SVG so it scales

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.

faaair but most of our block screenshots are just pngs and i built this in the block factory which doesn't have download as svg

@maribethb
maribethb enabled auto-merge (squash) July 23, 2026 18:17
@maribethb
maribethb merged commit 176da11 into RaspberryPiFoundation:main Jul 23, 2026
4 checks passed
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.

document custom aria for blocks

2 participants