Skip to content

fix(ui-instructure): use CondensedButton for AI component triggers#2636

Open
joyenjoyer wants to merge 1 commit into
masterfrom
INSTUI-5095-data-permission-levels-nutrition-facts-triggers-use-link-role-instead-of-button-wcag-4-1-2
Open

fix(ui-instructure): use CondensedButton for AI component triggers#2636
joyenjoyer wants to merge 1 commit into
masterfrom
INSTUI-5095-data-permission-levels-nutrition-facts-triggers-use-link-role-instead-of-button-wcag-4-1-2

Conversation

@joyenjoyer

@joyenjoyer joyenjoyer commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Link is changed to CondensedButton to comply with WCAG rules.

Test:

  • inspect AI components and observe if tags that were previously anchors are buttons now

@joyenjoyer

joyenjoyer commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@adamlobler I add you as a reviewer too, please check if CondensedButton is a good choice from a design perspective.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates AI component modal triggers in ui-instructure to use semantic buttons (via CondensedButton) instead of anchor links, aligning trigger semantics with accessibility expectations for actions that open dialogs.

Changes:

  • Replaced Link-based modal triggers (with href="#" and preventDefault) with CondensedButton triggers.
  • Updated @instructure/ui-buttons imports to include CondensedButton and removed @instructure/ui-link imports in both v1 (v11_6) and v2 (latest) implementations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/ui-instructure/src/NutritionFacts/v2/index.tsx Swaps modal trigger from Link to CondensedButton for v2.
packages/ui-instructure/src/NutritionFacts/v1/index.tsx Swaps modal trigger from Link to CondensedButton for v1 (v11_6).
packages/ui-instructure/src/DataPermissionLevels/v2/index.tsx Swaps modal trigger from Link to CondensedButton for v2.
packages/ui-instructure/src/DataPermissionLevels/v1/index.tsx Swaps modal trigger from Link to CondensedButton for v1 (v11_6).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

forceButtonRole={false}
href="#"
>
<CondensedButton onClick={() => setOpen(true)}>
forceButtonRole={false}
href="#"
>
<CondensedButton onClick={() => setOpen(true)}>
forceButtonRole={false}
href="#"
>
<CondensedButton onClick={() => setOpen(true)}>
forceButtonRole={false}
href="#"
>
<CondensedButton onClick={() => setOpen(true)}>
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2636/

Built to branch gh-pages at 2026-07-14 13:40 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Jul 14, 2026
@github-actions

Copy link
Copy Markdown

Visual regression report

No changes.

Status Count
Unchanged 32
Changed 0
New 0
Removed 0

📊 View full report

Baselines come from the visual-baselines branch. They refresh on every merge to master.

@HerrTopi HerrTopi left a comment

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.

consider the ai's suggestion about the aria dialog. Otherwise, looks good

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants