🎨 Palette: [UX improvement] Add aria-hidden to decorative SVGs (#70)

* Added aria-hidden="true" to decorative SVG icons within interactive elements (buttons, links) in Lightbox, ThemeToggle, Footer, BackLink, and MapView.
* Added role="alert" and aria-live="polite" to the MapView loading indicator.
* Documented learning in .Jules/palette.md

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Ralksta
2026-04-01 12:46:20 +02:00
committed by GitHub
parent dbc525e8d8
commit e739fdb518
6 changed files with 33 additions and 14 deletions

View File

@@ -151,7 +151,10 @@ export function MapView() {
if (error) {
return (
<div className="map-container__loading" style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%' }}>
<div
className="map-container__loading"
style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%' }}
>
<p>{error}</p>
</div>
);
@@ -162,27 +165,30 @@ export function MapView() {
{loading && (
<div
className="map-container__loading"
style={{
position: 'absolute',
inset: 0,
role="alert"
aria-live="polite"
style={{
position: 'absolute',
inset: 0,
zIndex: 1000,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
background: 'rgba(0, 0, 0, 0.5)',
color: '#fff'
color: '#fff',
}}
>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
<svg
aria-hidden="true"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
style={{ animation: 'spin 1s linear infinite', marginBottom: '8px' }}
>
<circle cx="12" cy="12" r="10" strokeOpacity="0.25"></circle>