SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Accessible JavaScript
Example: Accordion



Cologne, 09.10.2012
1   Accessible JavaScript: Accordion

2   Inaccessible examples

3   Keyboard

4   User defined colours

5   Screenreader

6   Enhancements

7   Accordion: The future
Accessible JavaScript

1. Accessible JavaScript?

                         





                             © pixelpark   |   3
Accessible JavaScript

1.  Can you use it fully with keyboard and keys?

2.  Can you use it with user defined colours?

3.  Can you use it with Screenreader?




                                                   © pixelpark   |   4
Accessible JavaScript

1. Inaccessible examples 





                             © pixelpark   |   5
Accessible JavaScript – Inaccessible examples 

1.  Only with mouse over (Example: Elegant Accordion)

2.  You can only click on it (Example: Easy Accordion)




                                                         © pixelpark   |   6
Elegant Accordion

                 





                     © pixelpark   |   7
Easy Accordion

              





                  © pixelpark   |   8
Accessible JavaScript

2. Keyboard and keys 





                         © pixelpark   |   9
Accessible JavaScript
Keyboard
JavaScript must be fully accessible with keyboard.

You mostly use with keyboard:
•  Tab
•  Arrow keys




                                                     © pixelpark   |   10
WAI-ARIA Best Practice:
Accordion
“An accordion component is a collection of expandable panels associated with a common outer
container. Panels consist of a header and an associated content region or panel. The primary
use of an Accordion is to present multiple sections of content on a single page without
scrolling, where all of the sections are peers in the application or object hierarchy. The general
look is similar to a tree where each root tree node is an expandable accordion header. The
user navigates and makes the contents of each panel visible (or not) by interacting with the
Accordion Header.”

http://www.w3.org/TR/wai-aria-practices/#accordion




                                                                                       © pixelpark   |   11
WAI-ARIA Best Practice:
Accordion
•  First you use tab to get on the first header of the accordion
•  Within the accordion:
     -  enter- / space key: open and close
     -  Arrow key right / down: next header
     -  Arrow key left / up: previous header
     -  end- / home key: first / last header
     -  CTRL + arrow key up: if you are in accordion content you get to header above




                                                                                       © pixelpark   |   12
Accessible JavaScript

2.1 Accessible Mootools Accordion

                                 





                                     © pixelpark   |   13
Accessible Mootools Accordion

                             





                                 © pixelpark   |   14
Accessible JavaScript

2.2 jQuery UI Accordion

                       





                           © pixelpark   |   15
jQuery UI Accordion

                   





                       © pixelpark   |   16
Accessible JavaScript

3. User defined colours 





                            © pixelpark   |   17
Accessible JavaScript
 

User defined colours 

If you are using your own colours, background images are not shown anymore.

                                                                           


In this case in most accordions you can not get the actual state of it – if it is open or closed.

                                                                                                 





                                                                                          © pixelpark   |   18
Accessible JavaScript

3.1 Accessible Mootools Accordion

                                 





                                     © pixelpark   |   19
Accessible Mootools Accordion

                             





                                 © pixelpark   |   20
Accessible JavaScript

3.2 jQuery UI Accordion

                       





                           © pixelpark   |   21
jQuery UI Accordion

                   





                       © pixelpark   |   22
Accessible JavaScript

4. Screenreader 





                        © pixelpark   |   23
Accessible JavaScript
Screenreader
JavaScript must be fully accessible with a Screenreader.

Using WAI-ARIA accordions could be optimized for a Screenreader:
•  You can use it the same way as without a Screenreader
•  A Screenreader gets additional information about actual state of the accordion and how it
  works.




                                                                                     © pixelpark   |   24
Accessible JavaScript
WAI-ARIA – Accordion Widget
WAI shows in detail how WAI-ARIA can improve widgets.

Accordion widget needs following attributes:
•  Accordion itself: role=tablist
•  Accordion header:
    -  role=tab
    -  aria-selected (is header is selected or not)
    -  aria-expanded (is selected header open or not)
    -  optional: aria-controls
•  Accordion – content open:
    -  role=tabpanel
    -  aria-labelledby (with header)
    -  aria-hidden (is content visible / open or not)



                                                        © pixelpark   |   25
WAI-ARIA – Accordion Widget

                           





                               © pixelpark   |   26
WAI-ARIA – Accordion Widget (ChromeVox) 





                                            © pixelpark   |   27
WAI-ARIA Example & Screenreader 

Screenreader        Header information                       Open content: information
NVDA (Firefox)      „Tab ausgewählt, erweitert /             1 x read
                    reduziert“ (translated: Tab selected
                    extended / reduced)
JAWS (IE)           „Registerkarte offen /                   Not read
                    geschlossen“ (translated: Tab open /
                    closed)
ChromeVox           „Tab ausgewählt, minimiert /             Not read
                    maximiert“ (translated: Tab selected
                    minimized / maximized)
VoiceOver           „Titel ausgewählt“ (translated: Titel    Not read
                    selected)
VoiceOver (iOS 6)   „Tabulator Auswahl 3 von 6“ (translated: Not read
                    Tab selected 3 of 6)




                                                                                  © pixelpark   |   28
WAI-ARIA – Accordion header

                           

Accordion         tab   aria-controls   aria-expanded   aria-selected

WAI example       X          X               X               X


Accessible        X                          X               X
Mootools Widget


jQuery UI         X          X                               X
Accordion


jQuery Mobile




                                                            © pixelpark   |   29
WAI-ARIA – Accordion content

Accordion           tabpanel   aria-labelledby   aria-hidden

WAI example            X             X               X


Accessible             X             X               X

Mootools Widget 



jQuery UI              X             X               X

Accordion 



jQuery Mobile                                        X




                                                               © pixelpark   |   30
Accessible JavaScript

4. Enhancements 





                        © pixelpark   |   31
Accessible JavaScript

                     

Accordion enhanced


What can be still enhanced?
•  Better contrast for keyboard users
•  For status icons on header use CSS content
•  A small description how accordion works (visible or only for Screenreader)




                                                                                © pixelpark   |   32
jQuery UI Accordion enhanced

                            





                                © pixelpark   |   33
Accessible JavaScript

4. Accordion: The future

                        





                            © pixelpark   |   34
Future: HTML 5 details/summary element

                                      





                                          © pixelpark   |   35
HTML 5 details/summary element (ChromeVox) 

Problem until now: details – content is not yet accessible.





                                                               © pixelpark   |   36
Imprint
Die in dieser Präsentation erarbeiteten Gedanken und Vorschläge sind geistiges Eigentum der
Pixelpark AG und unterliegen dem geltenden Urheberrecht. Die ganze oder teilweise
Vervielfältigung sowie jede Weitergabe an Dritte ist ohne schriftliche Genehmigung der
Pixelpark AG nicht gestattet. (All rights reserved to Pixelpark AG)

Sylvia Egger
Senior Online Developer
Pixelpark AG
Cäcilienkloster 2
D-50676 Köln

sylvia.egger@pixelpark.com

www.pixelpark.com



                                                                                   © pixelpark   |   37

Contenu connexe

Similaire à Accessible Javascript - Example Accordion

Cairo Graphics Kit
Cairo Graphics KitCairo Graphics Kit
Cairo Graphics KitESUG
 
OpenAjax Alliance And Widgets
OpenAjax Alliance And WidgetsOpenAjax Alliance And Widgets
OpenAjax Alliance And Widgetsguest42a607
 
Symfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsSymfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsXavier Lacot
 
Mozilla in Vietnam 2009
Mozilla in Vietnam 2009Mozilla in Vietnam 2009
Mozilla in Vietnam 2009Gen Kanai
 
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"Frank Wienberg
 
Mozilla In Malaysia
Mozilla In MalaysiaMozilla In Malaysia
Mozilla In MalaysiaGen Kanai
 
Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1Curity
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bendRaj Lal
 
Eclipse Con 2009 Sca Tools Short Talk
Eclipse Con 2009   Sca Tools Short TalkEclipse Con 2009   Sca Tools Short Talk
Eclipse Con 2009 Sca Tools Short TalkVincent Zurczak
 
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNHadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNDataWorks Summit
 
Rich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentationRich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentationNicko Borodachuk
 
Felipe Erias: Wolvic: Web Browsing on Extended Reality
Felipe Erias: Wolvic: Web Browsing on Extended RealityFelipe Erias: Wolvic: Web Browsing on Extended Reality
Felipe Erias: Wolvic: Web Browsing on Extended RealityIgalia
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Peter Procházka
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Peter Procházka
 
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraftstackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with UnikraftNETWAYS
 
Shrinking the container_zurich_july_2018
Shrinking the container_zurich_july_2018Shrinking the container_zurich_july_2018
Shrinking the container_zurich_july_2018Ewan Slater
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Peter Procházka
 
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...Förderverein Technische Fakultät
 

Similaire à Accessible Javascript - Example Accordion (20)

Cairo Graphics Kit
Cairo Graphics KitCairo Graphics Kit
Cairo Graphics Kit
 
OpenAjax Alliance And Widgets
OpenAjax Alliance And WidgetsOpenAjax Alliance And Widgets
OpenAjax Alliance And Widgets
 
Symfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsSymfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating products
 
Mozilla in Vietnam 2009
Mozilla in Vietnam 2009Mozilla in Vietnam 2009
Mozilla in Vietnam 2009
 
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
 
Mozilla In Malaysia
Mozilla In MalaysiaMozilla In Malaysia
Mozilla In Malaysia
 
Duel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & SkiaDuel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & Skia
 
Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1Java and Serverless - A Match Made In Heaven, Part 1
Java and Serverless - A Match Made In Heaven, Part 1
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
 
Eclipse Con 2009 Sca Tools Short Talk
Eclipse Con 2009   Sca Tools Short TalkEclipse Con 2009   Sca Tools Short Talk
Eclipse Con 2009 Sca Tools Short Talk
 
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNHadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
 
Rich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentationRich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentation
 
Felipe Erias: Wolvic: Web Browsing on Extended Reality
Felipe Erias: Wolvic: Web Browsing on Extended RealityFelipe Erias: Wolvic: Web Browsing on Extended Reality
Felipe Erias: Wolvic: Web Browsing on Extended Reality
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
 
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraftstackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
 
Csa container-security-in-aws-dw
Csa container-security-in-aws-dwCsa container-security-in-aws-dw
Csa container-security-in-aws-dw
 
Shrinking the container_zurich_july_2018
Shrinking the container_zurich_july_2018Shrinking the container_zurich_july_2018
Shrinking the container_zurich_july_2018
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
 
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
 

Dernier

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 

Dernier (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

Accessible Javascript - Example Accordion

  • 2. 1 Accessible JavaScript: Accordion 2 Inaccessible examples 3 Keyboard 4 User defined colours 5 Screenreader 6 Enhancements 7 Accordion: The future
  • 3. Accessible JavaScript 1. Accessible JavaScript? © pixelpark | 3
  • 4. Accessible JavaScript 1.  Can you use it fully with keyboard and keys? 2.  Can you use it with user defined colours? 3.  Can you use it with Screenreader? © pixelpark | 4
  • 5. Accessible JavaScript 1. Inaccessible examples © pixelpark | 5
  • 6. Accessible JavaScript – Inaccessible examples 1.  Only with mouse over (Example: Elegant Accordion) 2.  You can only click on it (Example: Easy Accordion) © pixelpark | 6
  • 7. Elegant Accordion © pixelpark | 7
  • 8. Easy Accordion © pixelpark | 8
  • 9. Accessible JavaScript 2. Keyboard and keys © pixelpark | 9
  • 10. Accessible JavaScript Keyboard JavaScript must be fully accessible with keyboard. You mostly use with keyboard: •  Tab •  Arrow keys © pixelpark | 10
  • 11. WAI-ARIA Best Practice: Accordion “An accordion component is a collection of expandable panels associated with a common outer container. Panels consist of a header and an associated content region or panel. The primary use of an Accordion is to present multiple sections of content on a single page without scrolling, where all of the sections are peers in the application or object hierarchy. The general look is similar to a tree where each root tree node is an expandable accordion header. The user navigates and makes the contents of each panel visible (or not) by interacting with the Accordion Header.” http://www.w3.org/TR/wai-aria-practices/#accordion © pixelpark | 11
  • 12. WAI-ARIA Best Practice: Accordion •  First you use tab to get on the first header of the accordion •  Within the accordion: -  enter- / space key: open and close -  Arrow key right / down: next header -  Arrow key left / up: previous header -  end- / home key: first / last header -  CTRL + arrow key up: if you are in accordion content you get to header above © pixelpark | 12
  • 13. Accessible JavaScript 2.1 Accessible Mootools Accordion © pixelpark | 13
  • 14. Accessible Mootools Accordion © pixelpark | 14
  • 15. Accessible JavaScript 2.2 jQuery UI Accordion © pixelpark | 15
  • 16. jQuery UI Accordion © pixelpark | 16
  • 17. Accessible JavaScript 3. User defined colours © pixelpark | 17
  • 18. Accessible JavaScript User defined colours If you are using your own colours, background images are not shown anymore. In this case in most accordions you can not get the actual state of it – if it is open or closed. © pixelpark | 18
  • 19. Accessible JavaScript 3.1 Accessible Mootools Accordion © pixelpark | 19
  • 20. Accessible Mootools Accordion © pixelpark | 20
  • 21. Accessible JavaScript 3.2 jQuery UI Accordion © pixelpark | 21
  • 22. jQuery UI Accordion © pixelpark | 22
  • 24. Accessible JavaScript Screenreader JavaScript must be fully accessible with a Screenreader. Using WAI-ARIA accordions could be optimized for a Screenreader: •  You can use it the same way as without a Screenreader •  A Screenreader gets additional information about actual state of the accordion and how it works. © pixelpark | 24
  • 25. Accessible JavaScript WAI-ARIA – Accordion Widget WAI shows in detail how WAI-ARIA can improve widgets. Accordion widget needs following attributes: •  Accordion itself: role=tablist •  Accordion header: -  role=tab -  aria-selected (is header is selected or not) -  aria-expanded (is selected header open or not) -  optional: aria-controls •  Accordion – content open: -  role=tabpanel -  aria-labelledby (with header) -  aria-hidden (is content visible / open or not) © pixelpark | 25
  • 26. WAI-ARIA – Accordion Widget © pixelpark | 26
  • 27. WAI-ARIA – Accordion Widget (ChromeVox) © pixelpark | 27
  • 28. WAI-ARIA Example & Screenreader Screenreader Header information Open content: information NVDA (Firefox) „Tab ausgewählt, erweitert / 1 x read reduziert“ (translated: Tab selected extended / reduced) JAWS (IE) „Registerkarte offen / Not read geschlossen“ (translated: Tab open / closed) ChromeVox „Tab ausgewählt, minimiert / Not read maximiert“ (translated: Tab selected minimized / maximized) VoiceOver „Titel ausgewählt“ (translated: Titel Not read selected) VoiceOver (iOS 6) „Tabulator Auswahl 3 von 6“ (translated: Not read Tab selected 3 of 6) © pixelpark | 28
  • 29. WAI-ARIA – Accordion header Accordion tab aria-controls aria-expanded aria-selected WAI example X X X X Accessible X X X Mootools Widget jQuery UI X X X Accordion jQuery Mobile © pixelpark | 29
  • 30. WAI-ARIA – Accordion content Accordion tabpanel aria-labelledby aria-hidden WAI example X X X Accessible X X X Mootools Widget jQuery UI X X X Accordion jQuery Mobile X © pixelpark | 30
  • 32. Accessible JavaScript Accordion enhanced What can be still enhanced? •  Better contrast for keyboard users •  For status icons on header use CSS content •  A small description how accordion works (visible or only for Screenreader) © pixelpark | 32
  • 33. jQuery UI Accordion enhanced © pixelpark | 33
  • 34. Accessible JavaScript 4. Accordion: The future © pixelpark | 34
  • 35. Future: HTML 5 details/summary element © pixelpark | 35
  • 36. HTML 5 details/summary element (ChromeVox) Problem until now: details – content is not yet accessible. © pixelpark | 36
  • 37. Imprint Die in dieser Präsentation erarbeiteten Gedanken und Vorschläge sind geistiges Eigentum der Pixelpark AG und unterliegen dem geltenden Urheberrecht. Die ganze oder teilweise Vervielfältigung sowie jede Weitergabe an Dritte ist ohne schriftliche Genehmigung der Pixelpark AG nicht gestattet. (All rights reserved to Pixelpark AG) Sylvia Egger Senior Online Developer Pixelpark AG Cäcilienkloster 2 D-50676 Köln sylvia.egger@pixelpark.com www.pixelpark.com © pixelpark | 37