Repository navigation
Connectors: Improve accessibility - #76456
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +88 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
|
Thanks for this! I'm traveling right now, but I'll review this as soon as I can. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR!
It looks good to me overall, but I think another issue that needs to be resolved is the callout section. If the "Install AI Experiments" or "Activate AI Experiments" button is pressed, the button disappears, and focus is lost.
916c84368e26642a3de19dea0bda6c0d.mp4
I can think of two approaches to fix this problem:
- Move focus to another interactive element; "Learn more↗" link.
- Instead of hiding the install/enable button, change its text to something like "AI Experiments enabled" and keep the focus on that button, and the button will have the disabled attribute.
| <FlexBlock> | ||
| <VStack spacing={ 0 }> | ||
| <Text weight={ 600 } size={ 15 }> | ||
| <h2 |
There was a problem hiding this comment.
Nit: I think we can remove this CSS by using the Text element.
<Text
weight={ 600 }
size={ 15 }
id={ headingId }
as="h2"
>
{ name }
</Text>| aria-expanded={ | ||
| pluginStatus === 'active' | ||
| ? isExpanded | ||
| : undefined | ||
| } |
There was a problem hiding this comment.
The same problem exists for Set up /Cancel, in that the state creates confusion with the button text. What does it mean to have a 'Cancel' button show
aria-expanded="false"? So, pressing this will unexpand the cancel state? It would be much clearer to have a button with static text e.g. 'Settings' andaria-expanded. That way it represents what you're expanding, and the state of the button is clear.
Based on the feedback above, this implementation does not seem appropriate. Perhaps one of the following approaches is needed:
- Use static text such as "Settings" with
aria-expandedattribute - Completely remove
aria-expandedattribute
Add aria-hidden="true" to all SVG logo components (OpenAI, Claude, Gemini, Default) since they are decorative — the connector name is always provided as text alongside the logo. Also change the custom logo img alt from the connector name to empty string for the same reason.
The Page component's header was hardcoding an h2 for the title. Since these are the primary page-level headings, they should be h1. Add a configurable headingLevel prop (default 1) to both Page and Header components.
Replace the Text component for connector names with an h2 heading element, giving each connector proper document structure. Wrap each connector item content in a role="group" with aria-labelledby pointing to the heading, so screen readers announce buttons in context (e.g. "Install button, OpenAI group").
The aria-expanded attribute was being set on the action button in all states, including Install and Activate where it has no semantic meaning. Now only apply it when pluginStatus is 'active' and the button actually controls an expandable settings panel.
Error messages displayed when saving an API key fails were not announced to screen readers. Add role="alert" to the error span so assistive technology announces it when it appears.
Use speak() from @wordpress/a11y to announce connector state transitions to screen readers. All messages include the connector name for context: - Plugin installed/activated successfully - API key saved (connected) - API key removed (disconnected) - API key validation errors (assertive priority)
Focus was lost after installing a plugin, saving an API key, or removing an API key because the component re-renders and the previously focused element changes. Add a ref to the action button and a pendingFocus pattern that restores focus when async operations complete.
When zoomed to 150%, expanding a connector and focusing the API key input caused the sticky header to cover it. Add scroll-margin-top to connector items and form inputs to ensure they scroll into view below the sticky header.
The "Learn more" link in the AI plugin callout used a Button with target="_blank" but didn't indicate to screen readers that it opens in a new tab. Replace with ExternalLink which automatically adds the "(opens in a new tab)" screen reader hint.
Update existing E2E tests to verify accessibility semantics: - Page title is h1 (level: 1) - Connector names are h2 headings (level: 2) - Each connector has a role="group" - Install buttons do not have aria-expanded - Error messages have role="alert" - Focus moves to Edit button after saving an API key
a6c6eb8 to
66d3d2a
Compare
|
Flaky tests detected in 91b81c7. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23152273034
|
commented
Mar 16, 2026
|
Hi @t-hamano, |
left a comment
There was a problem hiding this comment.
LGTM!
I believe all the feedback has been addressed appropriately.
@joedolson, I'd like to approve this PR since RC1 is just around the corner. However, please feel free to share any additional feedback if we've missed anything.
commented
Mar 17, 2026
|
Thank you a lot for the reviews @t-hamano. Happy to address any feedback that we get after the merge in a follow up. |
commented
Mar 17, 2026
|
There was a conflict while trying to cherry-pick the commit to the wp/7.0 branch. Please resolve the conflict manually and create a PR to the wp/7.0 branch. PRs to wp/7.0 are similar to PRs to trunk, but you should base your PR on the wp/7.0 branch instead of trunk. |
commented
Mar 17, 2026
|
Thanks for working on these fixes @jorgefilipecosta, it's greatly appreciated! |
commented
Mar 17, 2026
|
I'll look things over, but I think approval was the right path. Thanks, @t-hamano! |
commented
Mar 19, 2026
|
I cherry-picked #75963, which caused the automatic cherry-pick failure, to the |
commented
Mar 19, 2026
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: 67d0034 |

Summary
Addresses accessibility issues in the Connectors screen (Settings > Connectors) as reported in #75995, following @joedolson's guidance.
<h1>, each connector name is<h2>, establishing proper document hierarchyrole="group"witharia-labelledby, so screen readers announce buttons in context (e.g. "Install button, OpenAI group")speak()with the connector name includedrole="alert"for automatic screen reader announcementaria-hidden="true", custom logo img uses empty altscroll-margin-topprevents sticky header from covering focused inputs at 150% zoomExternalLinkto indicate it opens in a new tabFixes: #75995
Test plan
<h1>and connector names are<h2>headings (inspect DOM)role="group"witharia-labelledbyaria-expanded; Set up/Cancel/Edit buttons DOrole="alert"npm run test:e2e -- test/e2e/specs/admin/connectors.spec.js