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,9 +1,11 @@
|
||||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
const propTypes = {};
|
||||
|
||||
function GreenNotCompleted(props) {
|
||||
return (
|
||||
<Fragment>
|
||||
<span className='sr-only'>Not Passed</span>
|
||||
<svg
|
||||
height='50'
|
||||
viewBox='0 0 200 200'
|
||||
@ -26,6 +28,7 @@ function GreenNotCompleted(props) {
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
function GreenPass(props) {
|
||||
return (
|
||||
<Fragment>
|
||||
<span className='sr-only'>Passed</span>
|
||||
<svg
|
||||
height='50'
|
||||
viewBox='0 0 200 200'
|
||||
@ -47,6 +49,7 @@ function GreenPass(props) {
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user