fix accessibility issues
report challenges' completion state and remove <code> tag in test suite
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
d8bee6a7ad
commit
c6c1e347d0
@ -13,6 +13,7 @@ const propTypes = {
|
||||
|
||||
function getAccessibleText(err, pass, text) {
|
||||
let accessibleText = 'Waiting';
|
||||
const cleanText = text.replace(/<\/?code>/g, '');
|
||||
|
||||
// Determine test status (i.e. icon)
|
||||
if (err) {
|
||||
@ -22,7 +23,7 @@ function getAccessibleText(err, pass, text) {
|
||||
}
|
||||
|
||||
// Append the text itself
|
||||
return accessibleText + ' - ' + text;
|
||||
return accessibleText + ' - ' + cleanText;
|
||||
}
|
||||
|
||||
function TestSuite({ tests }) {
|
||||
|
@ -1,31 +1,34 @@
|
||||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
const propTypes = {};
|
||||
|
||||
function GreenNotCompleted(props) {
|
||||
return (
|
||||
<svg
|
||||
height='50'
|
||||
viewBox='0 0 200 200'
|
||||
width='50'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
{...props}
|
||||
>
|
||||
<g>
|
||||
<title>Not Passed</title>
|
||||
<circle
|
||||
cx='100'
|
||||
cy='99'
|
||||
fill='#FFFFFF'
|
||||
r='95'
|
||||
stroke='#006400'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
strokeWidth='5'
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
<Fragment>
|
||||
<span className='sr-only'>Not Passed</span>
|
||||
<svg
|
||||
height='50'
|
||||
viewBox='0 0 200 200'
|
||||
width='50'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
{...props}
|
||||
>
|
||||
<g>
|
||||
<title>Not Passed</title>
|
||||
<circle
|
||||
cx='100'
|
||||
cy='99'
|
||||
fill='#FFFFFF'
|
||||
r='95'
|
||||
stroke='#006400'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
strokeWidth='5'
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,52 +1,55 @@
|
||||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
function GreenPass(props) {
|
||||
return (
|
||||
<svg
|
||||
height='50'
|
||||
viewBox='0 0 200 200'
|
||||
width='50'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
{...props}
|
||||
>
|
||||
<g>
|
||||
<title>Passed</title>
|
||||
<circle
|
||||
cx='100'
|
||||
cy='99'
|
||||
fill='#006400'
|
||||
r='95'
|
||||
stroke='#006400'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
/>
|
||||
<rect
|
||||
fill='#ffffff'
|
||||
height='30'
|
||||
stroke='#ffffff'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
transform='rotate(-45, 120, 106.321)'
|
||||
width='128.85878'
|
||||
x='55.57059'
|
||||
y='91.32089'
|
||||
/>
|
||||
<rect
|
||||
fill='#ffffff'
|
||||
height='30'
|
||||
stroke='#ffffff'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
transform='rotate(45, 66.75, 123.75)'
|
||||
width='80.66548'
|
||||
x='26.41726'
|
||||
y='108.75'
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
<Fragment>
|
||||
<span className='sr-only'>Passed</span>
|
||||
<svg
|
||||
height='50'
|
||||
viewBox='0 0 200 200'
|
||||
width='50'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
{...props}
|
||||
>
|
||||
<g>
|
||||
<title>Passed</title>
|
||||
<circle
|
||||
cx='100'
|
||||
cy='99'
|
||||
fill='#006400'
|
||||
r='95'
|
||||
stroke='#006400'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
/>
|
||||
<rect
|
||||
fill='#ffffff'
|
||||
height='30'
|
||||
stroke='#ffffff'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
transform='rotate(-45, 120, 106.321)'
|
||||
width='128.85878'
|
||||
x='55.57059'
|
||||
y='91.32089'
|
||||
/>
|
||||
<rect
|
||||
fill='#ffffff'
|
||||
height='30'
|
||||
stroke='#ffffff'
|
||||
strokeDasharray='null'
|
||||
strokeLinecap='null'
|
||||
strokeLinejoin='null'
|
||||
transform='rotate(45, 66.75, 123.75)'
|
||||
width='80.66548'
|
||||
x='26.41726'
|
||||
y='108.75'
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user