✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
2.9 KiB
jsx-a11y/anchor-ambiguous-text
🚫 This rule is disabled in the ☑️ recommended config.
Enforces <a> values are not exact matches for the phrases "click here", "here", "link", "a link", or "learn more". Screen readers announce tags as links/interactive, but rely on values for context. Ambiguous anchor descriptions do not provide sufficient context for users.
Rule options
This rule takes one optional object argument with the parameter words.
{
"rules": {
"jsx-a11y/anchor-ambiguous-text": [2, {
"words": ["click this"],
}],
}
}
The words option allows users to modify the strings that can be checked for in the anchor text. Useful for specifying other words in other languages. The default value is set by DEFAULT_AMBIGUOUS_WORDS:
const DEFAULT_AMBIGUOUS_WORDS = ['click here', 'here', 'link', 'a link', 'learn more'];
The logic to calculate the inner text of an anchor is as follows:
- if an element has the
aria-labelproperty, its value is used instead of the inner text - if an element has
aria-hidden="true, it is skipped over - if an element is
<img />or configured to be interpreted like one, itsaltvalue is used as its inner text
Note that this rule still disallows ambiguous aria-label or alt values.
Note that this rule is case-insensitive, trims whitespace, and ignores certain punctuation ([,.?¿!‽¡;:]). It only looks for exact matches.
Succeed
<a>read this tutorial</a> // passes since it is not one of the disallowed words
<a>${here}</a> // this is valid since 'here' is a variable name
<a aria-label="tutorial on using eslint-plugin-jsx-a11y">click here</a> // the aria-label supersedes the inner text
Fail
<a>here</a>
<a>HERE</a>
<a>link</a>
<a>click here</a>
<a>learn more</a>
<a>learn more.</a>
<a>learn more,</a>
<a>learn more?</a>
<a>learn more!</a>
<a>learn more:</a>
<a>learn more;</a>
<a>a link</a>
<a> a link </a>
<a><span> click </span> here</a> // goes through element children
<a>a<i></i> link</a>
<a><i></i>a link</a>
<a><span aria-hidden="true">more text</span>learn more</a> // skips over elements with aria-hidden=true
<a aria-label="click here">something</a> // the aria-label here is inaccessible
<a><img alt="click here"/></a> // the alt tag is still ambiguous
<a alt="tutorial on using eslint-plugin-jsx-a11y">click here</a> // the alt tag is only parsed on img
Accessibility guidelines
Ensure anchor tags describe the content of the link, opposed to simply describing them as a link.
Compare
<p><a href="#">click here</a> to read a tutorial by Foo Bar</p>
which can be more concise and accessible with
<p>read <a href="#">a tutorial by Foo Bar</a></p>