add on focus

This commit is contained in:
MathuraMG 2016-08-24 13:10:06 -04:00
parent de62acdaaa
commit abe9ac4d5a
2 changed files with 4 additions and 3 deletions

View file

@ -11,6 +11,7 @@ const exitUrl = require('../../../images/exit.svg');
class SketchList extends React.Component { class SketchList extends React.Component {
componentDidMount() { componentDidMount() {
this.props.getProjects(this.props.username); this.props.getProjects(this.props.username);
document.getElementById('sketchlistbutton').focus();
} }
render() { render() {
@ -18,7 +19,7 @@ class SketchList extends React.Component {
<div className="sketch-list"> <div className="sketch-list">
<header className="sketch-list__header"> <header className="sketch-list__header">
<h2>Sketches</h2> <h2>Sketches</h2>
<button className="sketch-list__exit-button" onClick={this.props.closeSketchList}> <button className="sketch-list__exit-button" onClick={this.props.closeSketchList} id="sketchlistbutton">
<InlineSVG src={exitUrl} alt="Close Sketch List Overlay" /> <InlineSVG src={exitUrl} alt="Close Sketch List Overlay" />
</button> </button>
</header> </header>

View file

@ -17,14 +17,14 @@ class TextOutput extends React.Component {
</section> </section>
<p <p
tabIndex="0" tabIndex="0"
role="region" role="main"
id="textOutput-content-summary" id="textOutput-content-summary"
aria-label="text output summary" aria-label="text output summary"
> >
</p> </p>
<table <table
tabIndex="0" tabIndex="0"
role="region" role="main"
id="textOutput-content-details" id="textOutput-content-details"
aria-label="text output summary details" aria-label="text output summary details"
> >