]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Added accessibility to reveal markup in documentation 6330/head
authorMarius Olbertz <marius@owlbertz.de>
Thu, 26 Feb 2015 19:44:57 +0000 (20:44 +0100)
committerMarius Olbertz <marius@owlbertz.de>
Thu, 26 Feb 2015 19:44:57 +0000 (20:44 +0100)
doc/includes/reveal/examples_reveal_basic.html
doc/includes/reveal/examples_reveal_basic_rendered.html
doc/includes/reveal/examples_reveal_modal_examples.html
doc/includes/reveal/examples_reveal_modal_examples_rendered.html
doc/pages/components/reveal.html

index d5ec92465ce36fea444fe401b540d5d204d7c880..111762454960633c6638a5d65523a8b7afb42763 100644 (file)
@@ -2,11 +2,11 @@
 ```html
 <a href="#" data-reveal-id="myModal">Click Me For A Modal</a>
 
-<div id="myModal" class="reveal-modal" data-reveal>
-  <h2>Awesome. I have it.</h2>
+<div id="myModal" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
+  <h2 id="modalTitle">Awesome. I have it.</h2>
   <p class="lead">Your couch.  It is mine.</p>
   <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 ```
 {{/markdown}}
index 1c56cdc758263058bd3348a52df978f18136035f..f309ad2927089dbc43492b241bd8fe16ff67697b 100644 (file)
@@ -1,8 +1,8 @@
 <a href="#" data-reveal-id="myModal">Click Me For A Modal</a>
 
-<div id="myModal" class="reveal-modal" data-reveal>
-  <h2>Awesome. I have it.</h2>
+<div id="myModal" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
+  <h2 id="modalTitle">Awesome. I have it.</h2>
   <p class="lead">Your couch.  It is mine.</p>
   <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
\ No newline at end of file
index 483eb155d50588f291eb769b1b4d046032cc0a93..47e6a7b8266592d9aa338910ad85d9113158e5e5 100644 (file)
@@ -2,30 +2,30 @@
 ```html
 <!-- Triggers the modals -->
 <a href="#" data-reveal-id="firstModal" class="radius button">Modal in a modal&hellip;</a>
-<a href="#" data-reveal-id="videoModal" class="radius button">Example Modal w/Video&hellip;</a>
+<a href="#" data-reveal-id="videoModal" class="radius button">Example Modal with Video&hellip;</a>
 
 <!-- Reveal Modals begin -->
-<div id="firstModal" class="reveal-modal" data-reveal>
-  <h2>This is a modal.</h2>
+<div id="firstModal" class="reveal-modal" data-reveal aria-labelledby="firstModalTitle" aria-hidden="true" role="dialog">
+  <h2 id="firstModalTitle">This is a modal.</h2>
   <p>Reveal makes these very easy to summon and dismiss. The close button is simply an anchor with a unicode character icon and a class of <code>close-reveal-modal</code>. Clicking anywhere outside the modal will also dismiss it.</p>
   <p>Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.</p>
   <p><a href="#" data-reveal-id="secondModal" class="secondary button">Second Modal...</a></p>
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 
-<div id="secondModal" class="reveal-modal" data-reveal>
-  <h2>This is a second modal.</h2>
+<div id="secondModal" class="reveal-modal" data-reveal aria-labelledby="secondModalTitle" aria-hidden="true" role="dialog">
+  <h2 id="secondModalTitle">This is a second modal.</h2>
   <p>See? It just slides into place after the other first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.</p>
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 
-<div id="videoModal" class="reveal-modal large" data-reveal="">
-  <h2>This modal has video</h2>
-  <div class="flex-video widescreen vimeo" style="display: block;">
-    <iframe width="1280" height="720" src="http://www.youtube-nocookie.com/embed/wnXCopXXblE?rel=0" frameborder="0" allowfullscreen="" data-src="http://www.youtube-nocookie.com/embed/wnXCopXXblE?rel=0"></iframe>
+<div id="videoModal" class="reveal-modal large" data-reveal aria-labelledby="videoModalTitle" aria-hidden="true" role="dialog">
+  <h2 id="videoModalTitle">This modal has video</h2>
+  <div class="flex-video widescreen vimeo">
+    <iframe width="1280" height="720" src="//www.youtube-nocookie.com/embed/wnXCopXXblE?rel=0" frameborder="0" allowfullscreen></iframe>
   </div>
 
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 <!-- Reveal Modals end -->
 ```
index d044ca856dc783c5630dc3817db44bc2bf098ffb..9a23827ebc99193ce6ba5a3218b6a33222359033 100644 (file)
@@ -2,26 +2,26 @@
 <a href="#" data-reveal-id="videoModal" class="radius button">Example Modal with Video&hellip;</a>
 
 <!-- Reveal Modals begin -->
-<div id="firstModal" class="reveal-modal" data-reveal>
-  <h2>This is a modal.</h2>
+<div id="firstModal" class="reveal-modal" data-reveal aria-labelledby="firstModalTitle" aria-hidden="true" role="dialog">
+  <h2 id="firstModalTitle">This is a modal.</h2>
   <p>Reveal makes these very easy to summon and dismiss. The close button is simply an anchor with a unicode character icon and a class of <code>close-reveal-modal</code>. Clicking anywhere outside the modal will also dismiss it.</p>
   <p>Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.</p>
   <p><a href="#" data-reveal-id="secondModal" class="secondary button">Second Modal...</a></p>
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 
-<div id="secondModal" class="reveal-modal" data-reveal>
-  <h2>This is a second modal.</h2>
+<div id="secondModal" class="reveal-modal" data-reveal aria-labelledby="secondModalTitle" aria-hidden="true" role="dialog">
+  <h2 id="secondModalTitle">This is a second modal.</h2>
   <p>See? It just slides into place after the other first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.</p>
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 
-<div id="videoModal" class="reveal-modal large" data-reveal>
-  <h2>This modal has video</h2>
+<div id="videoModal" class="reveal-modal large" data-reveal aria-labelledby="videoModalTitle" aria-hidden="true" role="dialog">
+  <h2 id="videoModalTitle">This modal has video</h2>
   <div class="flex-video widescreen vimeo">
     <iframe width="1280" height="720" src="//www.youtube-nocookie.com/embed/wnXCopXXblE?rel=0" frameborder="0" allowfullscreen></iframe>
   </div>
 
-  <a class="close-reveal-modal">&#215;</a>
+  <a class="close-reveal-modal" aria-label="Close">&#215;</a>
 </div>
 <!-- Reveal Modals end -->
\ No newline at end of file
index 2612995098af33cd34ceb24128048cade7041363..e751763aa7da1b9df0cc049b634df8325b914172 100644 (file)
@@ -124,7 +124,7 @@ $(document).on('closed.fndtn.reveal', '[data-reveal]', function () {
 
 ## Accessibility
 
-<p class="panel">This component is not yet accessible. Stay tuned for updates in future releases.</p>
+<p class="panel">This component is not yet fully accessible. While it is usable via the keyboard, it has to be checked if additional ARIA attributes can enhance the components accessibility.</p>
 
 ***