Skip to content

fix(google-maps,gravatar): a11y misc fixes#802

Merged
harlan-zw merged 4 commits into
mainfrom
fix/a11y-staticmap-gravatar
May 27, 2026
Merged

fix(google-maps,gravatar): a11y misc fixes#802
harlan-zw merged 4 commits into
mainfrom
fix/a11y-staticmap-gravatar

Conversation

@harlan-zw

@harlan-zw harlan-zw commented May 27, 2026

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Related to a11y audit follow-up from #798

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Two medium-priority a11y gaps from the audit. ScriptGoogleMapsStaticMap had a hardcoded alt="Google Maps", leaving screen-reader users without map context; now exposes an optional alt prop (default unchanged). ScriptGravatar's fallback <span> placeholder had no semantics while loading; now gets role="status" and aria-label="Loading avatar".

Note

Branch was accidentally based on #801, so the diff includes that typo fix too. Resolves automatically once #801 merges.

harlan-zw added 3 commits May 27, 2026 15:25
The script stats pages on scripts.nuxt.com count active hardware
fingerprinting APIs (X Pixel: 4, Clarity: 5), but the first-party
guide and v1 release notes were citing the wider entropy-weighted
set (9 and 10). Use the stats-page numbers so both pages agree.
- Add optional `alt` prop on ScriptGoogleMapsStaticMap so authors can
  provide descriptive map labels instead of the hardcoded 'Google Maps'.
- Add role="status" + aria-label="Loading avatar" to the Gravatar
  placeholder span so the loading state is announced to assistive tech.

Follow-up to a11y audit from #798.
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scripts-playground Ready Ready Preview, Comment May 27, 2026 6:45am

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR contains minor updates across documentation and Vue components. Two documentation files are updated with revised fingerprinting API counts for third-party providers. Three runtime components receive improvements: ScriptGoogleMapsStaticMap adds a customizable alt prop for the map image, ScriptGravatar adds accessibility attributes to its loading indicator, and ScriptLoadingIndicator corrects its style binding syntax. All changes are focused on accessibility, accuracy, and bug fixes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix(google-maps,gravatar): a11y misc fixes' addresses the main changes (Google Maps alt prop and Gravatar accessibility improvements) but uses the vague term 'misc fixes' which suggests additional unrelated changes without specifying them. Consider revising the title to be more specific about the accessibility improvements, such as 'fix(google-maps,gravatar): add alt prop and loading aria attributes' to better reflect the actual changes and avoid the ambiguous 'misc fixes' phrasing.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, explaining the accessibility improvements made and acknowledging the unrelated changes from the parent branch.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/a11y-staticmap-gravatar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@harlan-zw harlan-zw changed the title fix(a11y): vimeo keyboard accessibility and video placeholder alt text fix(a11y): GoogleMapsStaticMap alt prop + Gravatar fallback aria May 27, 2026
@pkg-pr-new

pkg-pr-new Bot commented May 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@802

commit: 475e0f2

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/content/docs/1.guides/2.first-party.md`:
- Line 8: The claim that "X Pixel accesses `navigator.getBattery()`" is
inaccurate; remove the `navigator.getBattery()` reference from the X Pixel
sentence (the fragment mentioning "X Pixel" and the backticked
`navigator.getBattery()`) and then either update the "4 browser fingerprinting
APIs" count to reflect the new list or replace the removed API with a currently
documented fingerprinting API supported by browsers (and add a citation/source
for that API); ensure the sentence text and the numeric count stay consistent
after the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9209a8ce-bace-4d94-a649-1f25f97c2356

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed9c62 and 475e0f2.

📒 Files selected for processing (5)
  • docs/content/docs/1.guides/2.first-party.md
  • docs/content/docs/5.releases/1.v1.md
  • packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMapsStaticMap.vue
  • packages/script/src/runtime/components/ScriptGravatar.vue
  • packages/script/src/runtime/components/ScriptLoadingIndicator.vue

## The Problem

Every third-party script your site loads connects your users directly to external servers. Each request shares the user's IP address, and many scripts go further: the X Pixel accesses 9 browser fingerprinting APIs (including `navigator.getBattery()`{lang="ts"}), sets 5 tracking cookies (`muc_ads`, `guest_id_marketing`, `guest_id_ads`, `personalization_id`, `guest_id`), and phones home to 3 separate domains. Microsoft Clarity reads 10 fingerprinting APIs across 3 domains. Even Google Analytics at 154 KB sends data that can be correlated across sites.
Every third-party script your site loads connects your users directly to external servers. Each request shares the user's IP address, and many scripts go further: the X Pixel accesses 4 browser fingerprinting APIs (including `navigator.getBattery()`{lang="ts"}), sets 5 tracking cookies (`muc_ads`, `guest_id_marketing`, `guest_id_ads`, `personalization_id`, `guest_id`), and phones home to 3 separate domains. Microsoft Clarity reads 5 fingerprinting APIs across 3 domains. Even Google Analytics at 154 KB sends data that can be correlated across sites.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Does X Pixel (Twitter/X tracking pixel) currently use navigator.getBattery API for fingerprinting in 2026

💡 Result:

No. In publicly available, authoritative documentation for X Pixel, there is no indication that X Pixel uses the Battery Status API (navigator.getBattery / BatteryManager) as part of its tracking or fingerprinting. Reasoning and evidence: 1) X Pixel is documented by X as a JavaScript tag for conversion/event tracking and attribution; the docs describe implementation steps and data sending, but do not mention navigator.getBattery or any Battery Status API usage [1]. 2) The Battery Status API is widely discussed as a potential fingerprinting surface (i.e., the API exists and can be used by any site that chooses to) but that general capability is not evidence that X Pixel does so [2]. 3) A best-effort search for explicit references to X Pixel using navigator.getBattery did not find any source-level claim linking X Pixel to navigator.getBattery (most results discuss X Pixel at a higher level or other fingerprinting vectors) [1][2]. Important caveat: Absence of public documentation is not proof that no code path exists. X’s pixel code is served/executed dynamically from their infrastructure, and X Pixel may change over time; however, based on the official X Pixel documentation available, there is currently no cited evidence that X Pixel uses navigator.getBattery in 2026 [1].

Citations:


Fix the X Pixel navigator.getBattery() fingerprinting claim

  • The snippet’s statement that X Pixel accesses navigator.getBattery() isn’t supported by X’s publicly documented pixel/conversion tracking behavior, and the Battery Status API is deprecated/removed in major browsers.
  • Remove navigator.getBattery() from the example (and re-check the “4 fingerprinting APIs” count) or replace it with APIs backed by current, citable sources.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/1.guides/2.first-party.md` at line 8, The claim that "X
Pixel accesses `navigator.getBattery()`" is inaccurate; remove the
`navigator.getBattery()` reference from the X Pixel sentence (the fragment
mentioning "X Pixel" and the backticked `navigator.getBattery()`) and then
either update the "4 browser fingerprinting APIs" count to reflect the new list
or replace the removed API with a currently documented fingerprinting API
supported by browsers (and add a citation/source for that API); ensure the
sentence text and the numeric count stay consistent after the change.

@harlan-zw harlan-zw changed the title fix(a11y): GoogleMapsStaticMap alt prop + Gravatar fallback aria fix(google-maps,gravatar): a11y misc fixes May 27, 2026
@harlan-zw harlan-zw merged commit bb42bea into main May 27, 2026
19 checks passed
@harlan-zw harlan-zw deleted the fix/a11y-staticmap-gravatar branch May 27, 2026 07:17
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.

1 participant