From f1cbff3e17319dc8f6cc94b30cfcd350c8770161 Mon Sep 17 00:00:00 2001 From: Michael H Date: Wed, 21 Feb 2018 20:34:02 -0800 Subject: [PATCH 01/27] Fixed Accessiblity Issue jsx docblocks - 594 set ignoreTabKey to true so that keyboard only users can tab out of jsx docblocks --- src/components/CodeEditor/CodeEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CodeEditor/CodeEditor.js b/src/components/CodeEditor/CodeEditor.js index efaab557..fa582534 100644 --- a/src/components/CodeEditor/CodeEditor.js +++ b/src/components/CodeEditor/CodeEditor.js @@ -179,7 +179,7 @@ class CodeEditor extends Component { }, }} className="gatsby-highlight"> - + {error && ( From 96010b5d9772518d881db07d5f89c2daece4ee20 Mon Sep 17 00:00:00 2001 From: Sophie Alpert Date: Sat, 3 Mar 2018 19:01:18 -0800 Subject: [PATCH 02/27] Improve a11y of docs * Add placeholder/label to input on homepage demo * Mark sections with aria-expanded ![screenshot of markup with aria-expanded for sections](https://user-images.githubusercontent.com/6820/36941651-2f851bee-1f15-11e8-8090-e93e596b3d11.png) --- content/home/examples/an-application.js | 4 +- src/templates/components/Sidebar/Section.js | 178 +++++++++++--------- 2 files changed, 97 insertions(+), 85 deletions(-) diff --git a/content/home/examples/an-application.js b/content/home/examples/an-application.js index 7b516861..ec855876 100644 --- a/content/home/examples/an-application.js +++ b/content/home/examples/an-application.js @@ -13,6 +13,8 @@ class TodoApp extends React.Component {
@@ -56,4 +58,4 @@ class TodoList extends React.Component { } } -ReactDOM.render(, mountNode); \ No newline at end of file +ReactDOM.render(, mountNode); diff --git a/src/templates/components/Sidebar/Section.js b/src/templates/components/Sidebar/Section.js index bf6db263..2738c853 100644 --- a/src/templates/components/Sidebar/Section.js +++ b/src/templates/components/Sidebar/Section.js @@ -10,94 +10,104 @@ import isItemActive from 'utils/isItemActive'; import MetaTitle from '../MetaTitle'; import ChevronSvg from '../ChevronSvg'; -const Section = ({ - activeItemId, - createLink, - isActive, - isScrollSync, - location, - onLinkClick, - onSectionTitleClick, - section, -}) => ( -
- -
    + + {section.title} + - {section.items.map(item => ( -
  • + + +
      - {createLink({ - isActive: isScrollSync - ? activeItemId === item.id - : isItemActive(location, item), - item, - location, - onLinkClick, - section, - })} + {section.items.map(item => ( +
    • + {createLink({ + isActive: isScrollSync + ? activeItemId === item.id + : isItemActive(location, item), + item, + location, + onLinkClick, + section, + })} - {item.subitems && ( -
        - {item.subitems.map(subitem => ( -
      • - {createLink({ - isActive: isScrollSync - ? activeItemId === subitem.id - : isItemActive(location, subitem), - item: subitem, - location, - onLinkClick, - section, - })} -
      • - ))} -
      - )} -
    • - ))} -
    -
-); + {item.subitems && ( +
    + {item.subitems.map(subitem => ( +
  • + {createLink({ + isActive: isScrollSync + ? activeItemId === subitem.id + : isItemActive(location, subitem), + item: subitem, + location, + onLinkClick, + section, + })} +
  • + ))} +
+ )} + + ))} + + + ); + } +} export default Section; From 35ea09cf037a8d792186f2dc490934649554bbb8 Mon Sep 17 00:00:00 2001 From: Jordan Scales Date: Sun, 4 Mar 2018 16:57:14 -0500 Subject: [PATCH 03/27] improve a11y in homepage examples with some labels --- content/home/examples/a-component-using-external-plugins.js | 6 +++++- content/home/examples/an-application.js | 4 ++++ src/components/CodeEditor/CodeEditor.js | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/content/home/examples/a-component-using-external-plugins.js b/content/home/examples/a-component-using-external-plugins.js index 38ba7292..48eac0b6 100644 --- a/content/home/examples/a-component-using-external-plugins.js +++ b/content/home/examples/a-component-using-external-plugins.js @@ -2,7 +2,7 @@ class MarkdownEditor extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); - this.state = { value: 'Type some *markdown* here!' }; + this.state = { value: 'Hello, **world**!' }; } handleChange(e) { @@ -18,7 +18,11 @@ class MarkdownEditor extends React.Component { return (

Input

+