Skip to content

Resolve some accessibility issues.#747

Open
jgindin wants to merge 2 commits intogoogle:mainfrom
jgindin:0.8-a11y-issues
Open

Resolve some accessibility issues.#747
jgindin wants to merge 2 commits intogoogle:mainfrom
jgindin:0.8-a11y-issues

Conversation

@jgindin
Copy link
Collaborator

@jgindin jgindin commented Mar 2, 2026

Description

  1. Image needs to have an altText. If not specified, it defaults to an empty string, which indicates to a screen reader to skip the image entirely, assuming it is decorative.
  2. Icons need to ensure they are not in the tab order.

Pre-launch Checklist

  • [x ] I signed the CLA.
  • [ x] I read the Contributors Guide.
  • [ ]x I read the Style Guide.
  • I have added updates to the CHANGELOG.
  • [ x] I updated/added relevant documentation.
  • [ x] My code changes (if any) have tests.

1. Image needs to have an `altText`. If not specified, it defaults to
   an empty string, which indicates to a screen reader to skip the image
   entirely, assuming it is decorative.
2. Icons need to ensure they are not in the tab order.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to improve accessibility for images and icons. The changes for icons are good, but there are a few issues with the implementation for image altText. I've found a critical type definition error, a potential runtime error in data binding, and a minor opportunity for code clarification. My comments provide specific suggestions to address these points.

Copy link
Collaborator

@sugoi-yuzuru sugoi-yuzuru left a comment

Choose a reason for hiding this comment

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

Thanks!

@jgindin jgindin requested a review from sugoi-yuzuru March 2, 2026 20:36
inputBinding('url', () => properties.url),
inputBinding('usageHint', () => properties.usageHint),
inputBinding('altText', () => properties.altText),
inputBinding('altText', () => properties.altText ?? null),
Copy link
Collaborator

Choose a reason for hiding this comment

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

| | null seems to be the approach more aligned with the rest of the file to set default value here.

protected readonly resolvedAltText = computed(() => {
const raw = this.altText();
return raw ? this.resolvePrimitive(raw) : '';
return (raw ? this.resolvePrimitive(raw) : null) ?? '';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be as simple as

return this.resolvePrimitive(this.altText()) ?? '';`

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants