Merge pull request #29 from MathuraMG/label

add aria tags and roles
This commit is contained in:
Cassie Tarakajian 2016-08-01 14:01:29 -04:00 committed by GitHub
commit 7fb77772f7
26 changed files with 52 additions and 104 deletions

View file

@ -2,7 +2,7 @@
<svg width="14px" height="9px" viewBox="0 0 14 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="14px" height="9px" viewBox="0 0 14 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 39 (31667) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 39 (31667) - http://www.bohemiancoding.com/sketch -->
<title>arrow shape copy 2</title> <title>arrow shape copy 2</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962">
<g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-425.000000, -1168.000000)" fill="#333333"> <g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-425.000000, -1168.000000)" fill="#333333">

Before

Width:  |  Height:  |  Size: 1,007 B

After

Width:  |  Height:  |  Size: 1,017 B

View file

@ -2,7 +2,7 @@
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>Exit</title> <title>Exit</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="exit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="exit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Artboard-1" fill="#D8D8D8"> <g id="Artboard-1" fill="#D8D8D8">

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 826 B

View file

@ -2,7 +2,7 @@
<svg width="10px" height="15px" viewBox="0 0 10 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="10px" height="15px" viewBox="0 0 10 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>arrow shape copy</title> <title>arrow shape copy</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962">
<g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-529.000000, -1165.000000)" fill="#333333"> <g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-529.000000, -1165.000000)" fill="#333333">

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 925 B

View file

@ -2,7 +2,7 @@
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>Decrease Value</title> <title>Decrease Value</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="Decrease value" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Decrease value" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="16" transform="translate(0.000000, -6.000000)" fill="#D8D8D8"> <g id="16" transform="translate(0.000000, -6.000000)" fill="#D8D8D8">

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 662 B

View file

@ -2,7 +2,7 @@
<svg width="76px" height="35px" viewBox="0 0 76 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="76px" height="35px" viewBox="0 0 76 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
<title>p5js-rect</title> <title>p5js-rect</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Desktop-IDE-light" transform="translate(-92.000000, -60.000000)" fill="#EC245E"> <g id="Desktop-IDE-light" transform="translate(-92.000000, -60.000000)" fill="#EC245E">

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -2,7 +2,7 @@
<svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
<title>play</title> <title>play</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Desktop-IDE-light" transform="translate(-218.000000, -69.000000)" fill="#ED225D"> <g id="Desktop-IDE-light" transform="translate(-218.000000, -69.000000)" fill="#ED225D">

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -2,7 +2,7 @@
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>close shape</title> <title>close shape</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962">
<g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-558.000000, -1166.000000)" fill="#333333"> <g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-558.000000, -1166.000000)" fill="#333333">

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -2,7 +2,7 @@
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>Increase Value</title> <title>Increase Value</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="Increase Value" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Increase Value" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="16" fill="#D8D8D8"> <g id="16" fill="#D8D8D8">

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 668 B

View file

@ -2,7 +2,7 @@
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>preferences</title> <title>preferences</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs> <defs>
<path d="M14.6822397,16.2117311 L15.1198278,19.0213068 C14.3844186,19.4395702 13.5928664,19.770504 12.7592794,20 L11.0818617,17.703677 C10.7282919,17.7528772 10.367116,17.7783101 10,17.7783101 C9.63288395,17.7783101 9.2717081,17.7528772 8.91813825,17.703677 L7.24072063,20 C6.40713364,19.770504 5.6155814,19.4395702 4.88017224,19.0213068 L5.31776031,16.2117311 C4.73977887,15.7753775 4.22462249,15.2602211 3.78826886,14.6822397 L0.978693166,15.1198278 C0.560429839,14.3844186 0.22949601,13.5928664 -2.84217094e-14,12.7592794 L2.29632299,11.0818617 C2.24712285,10.7282919 2.22168987,10.367116 2.22168987,10 C2.22168987,9.63288395 2.24712285,9.2717081 2.29632299,8.91813825 L-8.12791077e-15,7.24072063 C0.22949601,6.40713364 0.560429839,5.6155814 0.978693166,4.88017224 L3.78826886,5.31776031 C4.22462249,4.73977887 4.73977887,4.22462249 5.31776031,3.78826886 L4.88017224,0.978693166 C5.6155814,0.560429839 6.40713364,0.22949601 7.24072063,0 L8.91813825,2.29632299 C9.2717081,2.24712285 9.63288395,2.22168987 10,2.22168987 C10.367116,2.22168987 10.7282919,2.24712285 11.0818617,2.29632299 L12.7592794,1.98620157e-14 C13.5928664,0.22949601 14.3844186,0.560429839 15.1198278,0.978693166 L14.6822397,3.78826886 C15.2602211,4.22462249 15.7753775,4.73977887 16.2117311,5.31776031 L19.0213068,4.88017224 C19.4395702,5.6155814 19.770504,6.40713364 20,7.24072063 L17.703677,8.91813825 C17.7528772,9.2717081 17.7783101,9.63288395 17.7783101,10 C17.7783101,10.367116 17.7528772,10.7282919 17.703677,11.0818617 L20,12.7592794 C19.770504,13.5928664 19.4395702,14.3844186 19.0213068,15.1198278 L16.2117311,14.6822397 C15.7753775,15.2602211 15.2602211,15.7753775 14.6822397,16.2117311 L14.6822397,16.2117311 Z M10,13.8891551 C12.147921,13.8891551 13.8891551,12.147921 13.8891551,10 C13.8891551,7.85207897 12.147921,6.11084493 10,6.11084493 C7.85207897,6.11084493 6.11084493,7.85207897 6.11084493,10 C6.11084493,12.147921 7.85207897,13.8891551 10,13.8891551 Z" id="path-1"></path> <path d="M14.6822397,16.2117311 L15.1198278,19.0213068 C14.3844186,19.4395702 13.5928664,19.770504 12.7592794,20 L11.0818617,17.703677 C10.7282919,17.7528772 10.367116,17.7783101 10,17.7783101 C9.63288395,17.7783101 9.2717081,17.7528772 8.91813825,17.703677 L7.24072063,20 C6.40713364,19.770504 5.6155814,19.4395702 4.88017224,19.0213068 L5.31776031,16.2117311 C4.73977887,15.7753775 4.22462249,15.2602211 3.78826886,14.6822397 L0.978693166,15.1198278 C0.560429839,14.3844186 0.22949601,13.5928664 -2.84217094e-14,12.7592794 L2.29632299,11.0818617 C2.24712285,10.7282919 2.22168987,10.367116 2.22168987,10 C2.22168987,9.63288395 2.24712285,9.2717081 2.29632299,8.91813825 L-8.12791077e-15,7.24072063 C0.22949601,6.40713364 0.560429839,5.6155814 0.978693166,4.88017224 L3.78826886,5.31776031 C4.22462249,4.73977887 4.73977887,4.22462249 5.31776031,3.78826886 L4.88017224,0.978693166 C5.6155814,0.560429839 6.40713364,0.22949601 7.24072063,0 L8.91813825,2.29632299 C9.2717081,2.24712285 9.63288395,2.22168987 10,2.22168987 C10.367116,2.22168987 10.7282919,2.24712285 11.0818617,2.29632299 L12.7592794,1.98620157e-14 C13.5928664,0.22949601 14.3844186,0.560429839 15.1198278,0.978693166 L14.6822397,3.78826886 C15.2602211,4.22462249 15.7753775,4.73977887 16.2117311,5.31776031 L19.0213068,4.88017224 C19.4395702,5.6155814 19.770504,6.40713364 20,7.24072063 L17.703677,8.91813825 C17.7528772,9.2717081 17.7783101,9.63288395 17.7783101,10 C17.7783101,10.367116 17.7528772,10.7282919 17.703677,11.0818617 L20,12.7592794 C19.770504,13.5928664 19.4395702,14.3844186 19.0213068,15.1198278 L16.2117311,14.6822397 C15.7753775,15.2602211 15.2602211,15.7753775 14.6822397,16.2117311 L14.6822397,16.2117311 Z M10,13.8891551 C12.147921,13.8891551 13.8891551,12.147921 13.8891551,10 C13.8891551,7.85207897 12.147921,6.11084493 10,6.11084493 C7.85207897,6.11084493 6.11084493,7.85207897 6.11084493,10 C6.11084493,12.147921 7.85207897,13.8891551 10,13.8891551 Z" id="path-1"></path>
</defs> </defs>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -2,7 +2,7 @@
<svg width="10px" height="15px" viewBox="0 0 10 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="10px" height="15px" viewBox="0 0 10 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>arrow shape copy</title> <title>arrow shape copy</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962">
<g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-496.000000, -1165.000000)" fill="#333333"> <g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-496.000000, -1165.000000)" fill="#333333">

Before

Width:  |  Height:  |  Size: 915 B

After

Width:  |  Height:  |  Size: 924 B

View file

@ -2,7 +2,7 @@
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
<title>stop</title> <title>stop</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Desktop-IDE-light" transform="translate(-280.000000, -69.000000)" fill="#ED225D"> <g id="Desktop-IDE-light" transform="translate(-280.000000, -69.000000)" fill="#ED225D">

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -2,7 +2,7 @@
<svg width="14px" height="9px" viewBox="0 0 14 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="14px" height="9px" viewBox="0 0 14 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 39 (31667) - http://www.bohemiancoding.com/sketch --> <!-- Generator: Sketch 39 (31667) - http://www.bohemiancoding.com/sketch -->
<title>arrow shape copy</title> <title>arrow shape copy</title>
<desc>Created with Sketch.</desc> <!-- <desc>Created with Sketch.</desc> -->
<defs></defs> <defs></defs>
<g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962"> <g id="IDEs" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.539999962">
<g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-394.000000, -1168.000000)" fill="#333333"> <g id="p5js-IDE-styles-foundation-pt-2" transform="translate(-394.000000, -1168.000000)" fill="#333333">

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 909 B

View file

@ -55,15 +55,15 @@ class Console extends React.Component {
}); });
return ( return (
<div ref="console" className={consoleClass}> <div ref="console" className={consoleClass} role="region" tabIndex="0" title="console">
<div className="preview-console__header"> <div className="preview-console__header">
<h2 className="preview-console__header-title">console</h2> <h2 className="preview-console__header-title">console</h2>
<a className="preview-console__collapse" onClick={this.props.collapseConsole} > <button className="preview-console__collapse" onClick={this.props.collapseConsole} aria-label="collapse console">
<InlineSVG src={downArrowUrl} /> <InlineSVG src={downArrowUrl} />
</a> </button>
<a className="preview-console__expand" onClick={this.props.expandConsole} > <button className="preview-console__expand" onClick={this.props.expandConsole} aria-label="expand console">
<InlineSVG src={upArrowUrl} /> <InlineSVG src={upArrowUrl} />
</a> </button>
</div> </div>
<div ref="console_messages" className="preview-console__messages"> <div ref="console_messages" className="preview-console__messages">
{childrenToDisplay} {childrenToDisplay}

View file

@ -12,7 +12,7 @@ function NewFileForm(props) {
placeholder="Name" placeholder="Name"
{...name} {...name}
/> />
<input type="submit" value="Add File" /> <input type="submit" value="Add File" aria-label="add file" />
</form> </form>
); );
} }

View file

@ -30,6 +30,7 @@ function Preferences(props) {
className="preferences__exit-button" className="preferences__exit-button"
onClick={props.closePreferences} onClick={props.closePreferences}
title="exit" title="exit"
aria-label="exit preferences"
> >
<InlineSVG src={exitUrl} alt="Exit Preferences" /> <InlineSVG src={exitUrl} alt="Exit Preferences" />
</button> </button>
@ -40,14 +41,11 @@ function Preferences(props) {
<button <button
className="preference__plus-button" className="preference__plus-button"
onClick={props.decreaseFont} onClick={props.decreaseFont}
id="preference-decrease-font-size" aria-label="decrease font size"
> >
<InlineSVG src={minusUrl} alt="Decrease Font Size" /> <InlineSVG src={minusUrl} alt="Decrease Font Size" />
<h6 className="preference__label">Decrease</h6> <h6 className="preference__label">Decrease</h6>
</button> </button>
<label htmlFor="preference-decrease-font-size" className="preference__button-label">
Decrease Font Size
</label>
<input <input
className="preference__value" className="preference__value"
aria-live="status" aria-live="status"
@ -60,14 +58,11 @@ function Preferences(props) {
<button <button
className="preference__minus-button" className="preference__minus-button"
onClick={props.increaseFont} onClick={props.increaseFont}
id="preference-increase-font-size" aria-label="increase font size"
> >
<InlineSVG src={plusUrl} alt="Increase Font Size" /> <InlineSVG src={plusUrl} alt="Increase Font Size" />
<h6 className="preference__label">Increase</h6> <h6 className="preference__label">Increase</h6>
</button> </button>
<label htmlFor="preference-increase-font-size" className="preference__button-label">
Increase Font Size
</label>
</div> </div>
<div className="preference"> <div className="preference">
@ -75,14 +70,11 @@ function Preferences(props) {
<button <button
className="preference__plus-button" className="preference__plus-button"
onClick={props.decreaseIndentation} onClick={props.decreaseIndentation}
id="preference-decrease-indentation" aria-label="decrease indentation amount"
> >
<InlineSVG src={minusUrl} alt="DecreaseIndentation Amount" /> <InlineSVG src={minusUrl} alt="DecreaseIndentation Amount" />
<h6 className="preference__label">Decrease</h6> <h6 className="preference__label">Decrease</h6>
</button> </button>
<label htmlFor="preference-decrease-indentation" className="preference__button-label">
Decrease Indentation Amount
</label>
<input <input
className="preference__value" className="preference__value"
aria-live="status" aria-live="status"
@ -95,17 +87,14 @@ function Preferences(props) {
<button <button
className="preference__minus-button" className="preference__minus-button"
onClick={props.increaseIndentation} onClick={props.increaseIndentation}
id="preference-increase-indentation" aria-label="increase indentation amount"
> >
<InlineSVG src={plusUrl} alt="IncreaseIndentation Amount" /> <InlineSVG src={plusUrl} alt="IncreaseIndentation Amount" />
<h6 className="preference__label">Increase</h6> <h6 className="preference__label">Increase</h6>
</button> </button>
<label htmlFor="preference-increase-indentation" className="preference__button-label">
Increase Indentation Amount
</label>
<div className="preference__vertical-list"> <div className="preference__vertical-list">
<button className={preferencesSpaceOptionClass} onClick={props.indentWithSpace}>Spaces</button> <button className={preferencesSpaceOptionClass} onClick={props.indentWithSpace} aria-label="indentation with space">Spaces</button>
<button className={preferencesTabOptionClass} onClick={props.indentWithTab}>Tabs</button> <button className={preferencesTabOptionClass} onClick={props.indentWithTab} aria-label="indentation with tab">Tabs</button>
</div> </div>
</div> </div>
</section> </section>

View file

@ -15,24 +15,27 @@ function Sidebar(props) {
<div className="sidebar__header"> <div className="sidebar__header">
<h3 className="sidebar__title">Sketch Files</h3> <h3 className="sidebar__title">Sketch Files</h3>
<div className="sidebar__icons"> <div className="sidebar__icons">
<a <button
aria-label="add file"
className="sidebar__add" className="sidebar__add"
onClick={props.newFile} onClick={props.newFile}
> >
+ +
</a> </button>
<a <button
aria-label="collapse file navigation"
className="sidebar__contract" className="sidebar__contract"
onClick={props.collapseSidebar} onClick={props.collapseSidebar}
> >
<InlineSVG src={leftArrowUrl} /> <InlineSVG src={leftArrowUrl} />
</a> </button>
<a <button
aria-label="expand file navigation"
className="sidebar__expand" className="sidebar__expand"
onClick={props.expandSidebar} onClick={props.expandSidebar}
> >
<InlineSVG src={rightArrowUrl} /> <InlineSVG src={rightArrowUrl} />
</a> </button>
</div> </div>
</div> </div>
<ul className="sidebar__file-list"> <ul className="sidebar__file-list">

View file

@ -23,18 +23,13 @@ function Toolbar(props) {
return ( return (
<div className="toolbar"> <div className="toolbar">
<img className="toolbar__logo" src={logoUrl} alt="p5js Logo" /> <img className="toolbar__logo" src={logoUrl} alt="p5js Logo" />
<button className={playButtonClass} onClick={props.startSketch} id="play-button"> <button className={playButtonClass} onClick={props.startSketch} aria-label="play sketch">
<InlineSVG src={playUrl} alt="Play Sketch" /> <InlineSVG src={playUrl} alt="Play Sketch" />
</button> </button>
<label htmlFor="play-button" className="toolbar__button-label">
play <button className={stopButtonClass} onClick={props.stopSketch} aria-label="stop sketch">
</label>
<button className={stopButtonClass} onClick={props.stopSketch} id="stop-button">
<InlineSVG src={stopUrl} alt="Stop Sketch" /> <InlineSVG src={stopUrl} alt="Stop Sketch" />
</button> </button>
<label htmlFor="stop-button" className="toolbar__button-label">
stop
</label>
<div className="toolbar__project-name-container"> <div className="toolbar__project-name-container">
<span <span
className="toolbar__project-name" className="toolbar__project-name"
@ -56,13 +51,10 @@ function Toolbar(props) {
<button <button
className={preferencesButtonClass} className={preferencesButtonClass}
onClick={props.openPreferences} onClick={props.openPreferences}
id="preferences-button" aria-label="open preferences"
> >
<InlineSVG src={preferencesUrl} alt="Show Preferences" /> <InlineSVG src={preferencesUrl} alt="Show Preferences" />
</button> </button>
<label htmlFor="preferences-button" className="toolbar__button-label">
preferences
</label>
</div> </div>
); );
} }

View file

@ -5,26 +5,24 @@ function LoginForm(props) {
return ( return (
<form className="login-form" onSubmit={handleSubmit(props.loginUser.bind(this))}> <form className="login-form" onSubmit={handleSubmit(props.loginUser.bind(this))}>
<p className="login-form__field"> <p className="login-form__field">
<label className="login-form__email-label" htmlFor="email">Email:</label>
<input <input
className="login-form__email-input" className="login-form__email-input"
id="email" aria-label="email"
type="text" type="text"
placeholder="Email" placeholder="Email"
{...email} {...email}
/> />
</p> </p>
<p className="login-form__field"> <p className="login-form__field">
<label className="signup-form__password-label" htmlFor="password">Password:</label>
<input <input
className="signup-form__password-input" className="signup-form__password-input"
id="password" aria-label="password"
type="password" type="password"
placeholder="Password" placeholder="Password"
{...password} {...password}
/> />
</p> </p>
<input type="submit" value="Login" /> <input type="submit" value="Login" aria-label="login" />
</form> </form>
); );
} }

View file

@ -5,51 +5,42 @@ function SignupForm(props) {
return ( return (
<form className="signup-form" onSubmit={handleSubmit(props.signUpUser.bind(this))}> <form className="signup-form" onSubmit={handleSubmit(props.signUpUser.bind(this))}>
<p className="signup-form__field"> <p className="signup-form__field">
<label className="signup-form__username-label" htmlFor="username">Username:</label>
<input <input
className="signup-form__username-input" className="signup-form__username-input"
id="username" aria-label="username"
type="text" type="text"
placeholder="Username" placeholder="Username"
{...username} {...username}
/> />
</p> </p>
<p className="signup-form__field"> <p className="signup-form__field">
<label className="signup-form__email-label" htmlFor="email">Email:</label>
<input <input
className="signup-form__email-input" className="signup-form__email-input"
id="email" aria-label="email"
type="text" type="text"
placeholder="Email" placeholder="Email"
{...email} {...email}
/> />
</p> </p>
<p className="signup-form__field"> <p className="signup-form__field">
<label className="signup-form__password-label" htmlFor="password">Password:</label>
<input <input
className="signup-form__password-input" className="signup-form__password-input"
id="password" aria-label="password"
type="password" type="password"
placeholder="Password" placeholder="Password"
{...password} {...password}
/> />
</p> </p>
<p className="signup-form__field"> <p className="signup-form__field">
<label
className="signup-form__confirm-password-label"
htmlFor="confirm-password"
>
Confirm Password:
</label>
<input <input
className="signup-form__confirm-password-input" className="signup-form__confirm-password-input"
id="confirm-password"
type="password" type="password"
placeholder="Confirm Password" placeholder="Confirm Password"
aria-label="confirm password"
{...confirmPassword} {...confirmPassword}
/> />
</p> </p>
<input type="submit" value="Sign Up" /> <input type="submit" value="Sign Up" aria-label="sign up" />
</form> </form>
); );
} }

View file

@ -108,15 +108,6 @@
} }
} }
%hidden-label {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}
%modal { %modal {
background-color: $light-modal-background-color; background-color: $light-modal-background-color;
border: 1px solid $light-modal-border-color; border: 1px solid $light-modal-border-color;

View file

@ -54,12 +54,14 @@
} }
.preview-console__collapse { .preview-console__collapse {
@extend %icon;
.preview-console--collapsed & { .preview-console--collapsed & {
display: none; display: none;
} }
} }
.preview-console__expand { .preview-console__expand {
@extend %icon;
display: none; display: none;
.preview-console--collapsed & { .preview-console--collapsed & {
display: inline-block; display: inline-block;

View file

@ -6,11 +6,6 @@
justify-content: center; justify-content: center;
} }
.login-form__email-label,
.login-form__password-label {
display: none;
}
.login-form__email-input, .login-form__email-input,
.login-form__password-input { .login-form__password-input {
width: #{300 / $base-font-size}rem; width: #{300 / $base-font-size}rem;

View file

@ -79,7 +79,3 @@
@extend %preference-option--selected; @extend %preference-option--selected;
} }
} }
.preference__button-label {
@extend %hidden-label
}

View file

@ -16,6 +16,7 @@
} }
.sidebar__add { .sidebar__add {
@extend %icon;
cursor: pointer; cursor: pointer;
height: #{26 / $base-font-size}rem; height: #{26 / $base-font-size}rem;
margin-right: #{16 / $base-font-size}rem; margin-right: #{16 / $base-font-size}rem;

View file

@ -6,13 +6,6 @@
justify-content: center; justify-content: center;
} }
.signup-form__username-label,
.signup-form__email-label,
.signup-form__password-label,
.signup-form__confirm-password-label {
display: none;
}
.signup-form__username-input, .signup-form__username-input,
.signup-form__email-input, .signup-form__email-input,
.signup-form__password-input, .signup-form__password-input,

View file

@ -55,9 +55,6 @@
} }
} }
.toolbar__button-label {
@extend %hidden-label
}
.toolbar__project-owner { .toolbar__project-owner {
margin-left: #{5 / $base-font-size}rem; margin-left: #{5 / $base-font-size}rem;
} }