Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use data to set focus instead of class #1397

Merged
merged 2 commits into from
Feb 21, 2025
Merged

Conversation

astagi
Copy link
Member

@astagi astagi commented Feb 13, 2025

Descrizione

Fixes italia/design-react-kit#1150

Checklist

Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
bootstrap-italia ✅ Ready (Inspect) Visit Preview Feb 13, 2025 3:08pm

@Fupete
Copy link
Contributor

Fupete commented Feb 13, 2025

@astagi prossimi giorni faccio un po' di test su diversi device e browser 🤞

Copy link
Contributor

@Fupete Fupete left a comment

Choose a reason for hiding this comment

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

@astagi Dai miei test sembra tutto apposto in questa semplificazione verso il solo approccio "data-" invece di "class-" per escludere il mouse.

Ho testato su:

  • Windows 11 Home (con UTM Virtual Machine): Browser Edge 132
  • OSX 15: Browsers Firefox 135 + Safari 18 (tutti latest)

Il focus mi sembra si comporti esattamente allo stesso modo che nell'attuale release che usa il metodo class 'focus--mouse'. Quindi dovrebbe essere corretto questo approccio di rimuovere quest'ultimo a favore del solo approccio con "data-", che può permetterci più scalabilità sui framework funzionali React e c.

Dovrebbe restare per il futuro "solo" quanto evidenziato nella #1352 più, auspicabile, documentare in un fondamento "Focus" l'approccio da aggiungere sia alla documentazione di .italia che a quella specifica di Bootstrap Italia. Lo farei una volta che saremo riusciti ad aggiornare il focus anche in UI Kit Italia.

@Fupete
Copy link
Contributor

Fupete commented Feb 17, 2025

@astagi ovviamente questa è una bella "Breaking" da documentare perché se qualcuno avesse usato quella classe ".focus--mouse" per qualche controllo o implementazione ulteriore di accessibilità in questo modo si romperà. Alternativa lasciare entrambi... ma anche secondo me, come dicevamo, se siamo a semplificare in ottica futuro salto a Web Components facciamolo.

@astagi astagi merged commit 7350bf4 into main Feb 21, 2025
7 checks passed
@astagi astagi deleted the fix/use_data_for_focus branch February 21, 2025 17:43
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.

Componenti Accordion e Tab: al click appare il focus
2 participants