Преглед на файлове

note on kbd for code blocks

Heydon Pickering преди 8 години
родител
ревизия
9b063fcf25
променени са 4 файла, в които са добавени 26 реда и са изтрити 0 реда
  1. 4 0
      content/patterns/coding/code-blocks.md
  2. 11 0
      docs/patterns/coding/code-blocks/index.html
  3. 11 0
      docs/print-version/index.html
  4. 0 0
      docs/service-worker.js

+ 4 - 0
content/patterns/coding/code-blocks.md

@@ -46,3 +46,7 @@ toggle.addEventListener('click', (e) => {
   e.target.setAttribute('aria-pressed', !pressed);
 });
 {{</codeBlock>}}
+
+{{% note %}}
+To preserve the wrapping inside code blocks, horizontal scrolling is implemented. To make sure scrolling is keyboard accessible, code blocks are focusable. An `aria-label` is provided to identify the code block to screen reader users.
+{{% /note %}}

+ 11 - 0
docs/patterns/coding/code-blocks/index.html

@@ -411,6 +411,17 @@ toggle.addEventListener('click', (e) => {
 </code></pre>
 
 
+<aside aria-label="note" class="note">
+  <div>
+    <svg aria-hidden="true" viewBox="0 0 41.667306 41.66729" focusable="false">
+      <use xlink:href="#info"></use>
+    </svg>
+    <p>To preserve the wrapping inside code blocks, horizontal scrolling is implemented. To make sure scrolling is keyboard accessible, code blocks are focusable. An <code>aria-label</code> is provided to identify the code block to screen reader users.</p>
+
+  </div>
+</aside>
+
+
   </main>
 
           <footer role="contentinfo">

+ 11 - 0
docs/print-version/index.html

@@ -1558,6 +1558,17 @@ toggle.addEventListener('click', (e) => {
 </code></pre>
 
 
+<aside aria-label="note" class="note">
+  <div>
+    <svg aria-hidden="true" viewBox="0 0 41.667306 41.66729" focusable="false">
+      <use xlink:href="#info"></use>
+    </svg>
+    <p>To preserve the wrapping inside code blocks, horizontal scrolling is implemented. To make sure scrolling is keyboard accessible, code blocks are focusable. An <code>aria-label</code> is provided to identify the code block to screen reader users.</p>
+
+  </div>
+</aside>
+
+
           </div>
         
           <div class="pattern-section">

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
docs/service-worker.js


Някои файлове не бяха показани, защото твърде много файлове са промени