Skip to content

docs(DiscoverySkip): announce final-step button as "Complete tour"#421

Merged
johnleider merged 1 commit into
masterfrom
docs/skillz-complete-aria-label
Jun 29, 2026
Merged

docs(DiscoverySkip): announce final-step button as "Complete tour"#421
johnleider merged 1 commit into
masterfrom
docs/skillz-complete-aria-label

Conversation

@johnleider

Copy link
Copy Markdown
Member

Problem

On the last step of a Skillz tour, the primary button reads "Complete" but announces to screen readers as "Skip tour" — the semantic opposite of the action it performs.

Root cause

The tour footer (DocsDiscoveryStep.vue) reuses Discovery.Skip for two roles:

  • mid-tour Exit (v-if="!isLast")
  • last-step Complete (v-else)

DiscoverySkip.vue hardcoded aria-label="Skip tour" for both. Its skip() already branches on root.isLast — on the final step it calls skillz.complete() and routes to the tour's completeRoute, so the behavior was always correct; only the label was wrong.

Fix

Derive the label from the same root.isLast ref, mirroring the pattern DiscoveryNext.vue already uses for its Go to next stepComplete tour swap:

-    aria-label="Skip tour"
+    :aria-label="root.isLast.value ? 'Complete tour' : 'Skip tour'"
  • Mid-tour Exit stays Skip tour.
  • Last-step Complete becomes Complete tour.

No behavior change — Discovery.Next is hidden in interactive tours, so the last-step action must remain Discovery.Skip; only its announced label is corrected.

Verification

Drove the using-search tour end-to-end in a browser:

  • Step 1 Exit button → aria-label="Skip tour" (unchanged)
  • Step 9 Complete button → aria-label="Complete tour" (was Skip tour)
  • Completion still records status: "completed" and navigates to the tour detail page.

The skillz tour footer reuses Discovery.Skip for the last-step primary
action (visible text "Complete"), but the button hardcoded
`aria-label="Skip tour"`. Screen readers therefore announced the
completion control as its semantic opposite ("Skip tour").

skip() already branches on `root.isLast` — on the final step it calls
skillz.complete() and routes to the completeRoute, so the behavior was
correct; only the label was wrong. Derive the label from the same
`root.isLast` ref (matching DiscoveryNext's existing pattern) so the
mid-tour Exit button stays "Skip tour" and the final button becomes
"Complete tour". No behavior change.
@johnleider johnleider added this to the v1.0.0 milestone Jun 29, 2026
@johnleider johnleider added the T: bug Something isn't working label Jun 29, 2026
@johnleider johnleider self-assigned this Jun 29, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: df87010

@johnleider johnleider merged commit a7791b6 into master Jun 29, 2026
18 checks passed
@johnleider johnleider deleted the docs/skillz-complete-aria-label branch June 29, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant