Linkable buttons
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
- Ambito
- accessibility, frontend
Direzione di ricerca
Inizia confrontando i pattern documentati per load-more, masthead, site-menu, tabs e buttons-and-CTAs, quindi esamina il comportamento attuale dei componenti Button e Link menzionato nell’issue. Il lavoro sarà considerato completato quando sarà stato concordato un pattern per tabs, toggles e pagination e saranno state aggiornate le indicazioni pertinenti sui componenti; questa issue non definisce un’implementazione né dei test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello!
I think this is slightly different than https://github.com/bbc/gef-docs/issues/59 but let me know if it overlaps.
I'm looking at a few of the use-cases where links are being used in place of buttons and trying to see if there is a general improvement that should be applied to them.
Tabs
One use-case are tabs that link to standalone pages, such as the date tabs on:
Some similar implementations offer links instead of buttons if JS is disabled, but that prevents a user from opening one of the tabs in a new browser tab (assuming such a feature is still useful to our users)
More toggle/link
Another use-case is the More toggle in the global navigation, which links to the footer page fragment to cater for users without javascript, with the JS enhancing it opening the 'More' drawer. This is read out as a link by assistive tech.
Pagination
Some usage of pagination may also be considered included in this if - when javascript is enabled - the pagination links change the content in the page rather than linking to a new page (although they may change the url and title tag which could mean a link is fine)
Looking through the current GEF documentation:
- https://bbc.github.io/gef-docs/components/load-more/ seems to contain an approach that hides pagination links and displays a show more button.
- https://bbc.github.io/gef-docs/components/masthead/#the-more-link allows the more toggle to remain an anchor, whereas the approach in https://bbc.github.io/gef-docs/components/site-menu/ where a button with expanded state is used looks to be more desirable.
- https://bbc.github.io/gef-docs/components/tabs/ uses same-page links to the tab contents rather than linking to individual pages when JS is not enabled, so I'm not sure if tabs with external links need to be considered here as well?
Would you agree that these tabs/toggles should be pronounced as buttons and not as links and function in the same way as buttons do (https://bbc.github.io/gef-docs/components/buttons-and-ctas/#recommended-behaviour)? Or should they still be links and maybe (for the tabs example) change the url and title tag?
There are a few options we can see to achieve this, but non seem ideal.
- Replace the anchor elements as buttons when JS activates (we are using React which makes this easier) which could offer a strange experience if the JS activation takes some time and would prevent the user loading individual pages in a new tab.
- Make a link act like a button using
role=buttonand simulating a click even when the space button is pressed - I can guess at this being not widely supported or having some other quirk?
Any thoughts on the above?
At the moment I'm not trying to implement any of these patterns (with the exception of maybe the More button in the masthead) but looking at the interface and behaviour of generic Button and Link components that may be used as part of such a pattern.
- Lingua principale
- JavaScript
- Stelle
- 50
- Fork
- 19
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bbc/gel
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
-
Information panels - WCAG 2.1 2. Keyboard TrapForse di nuovo libera @mathalete l’ha presa 997 giorni fa e non c’è nessuna pull request aperta. Aperta
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
pedroapfilho/localveil#120 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ImpactMojo/ImpactMojo#1385 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno