File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ type Props = {
30
30
/**
31
31
* A progress bar for the loop video component.
32
32
*
33
- * Why don't we use the <progress /> element?
34
- * It was not possible to properly style the native progress element in safari.
33
+ * Q. Why don't we use the <progress /> element?
34
+ * A. It was not possible to properly style the native progress element in safari.
35
35
*/
36
36
export const LoopVideoProgressBar = ( {
37
37
videoId,
@@ -44,17 +44,18 @@ export const LoopVideoProgressBar = ({
44
44
if ( Number . isNaN ( progressPercentage ) ) {
45
45
return null ;
46
46
}
47
+ const roundedProgressPercentage = Number ( progressPercentage . toFixed ( 2 ) ) ;
47
48
48
49
return (
49
50
< div
50
51
role = "progressbar"
51
52
aria-labelledby = { videoId }
52
- aria-valuenow = { progressPercentage }
53
+ aria-valuenow = { roundedProgressPercentage }
53
54
aria-valuemin = { 0 }
54
55
aria-valuemax = { 100 }
55
56
css = { styles }
56
57
>
57
- < span css = { foregroundStyles ( progressPercentage ) } />
58
+ < span css = { foregroundStyles ( roundedProgressPercentage ) } />
58
59
</ div >
59
60
) ;
60
61
} ;
You can’t perform that action at this time.
0 commit comments