Skip to content

Commit 1433558

Browse files
committed
Only accessibility tab needs to be fixed
1 parent a70ffc6 commit 1433558

File tree

6 files changed

+48
-88
lines changed

6 files changed

+48
-88
lines changed

src/app/components/Buttons/Tutorial.tsx

Lines changed: 41 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -207,72 +207,56 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
207207
},
208208
];
209209
break;
210-
// <div>
211-
// Nodes from the accessibility tree have either a role <strong>role</strong> or <strong>internalRole</strong>
212-
// <ul>
213-
// <li>
214-
// <i><b>Role</b></i> refers to <strong> ARIA </strong> roles, which indicate the purpose of the element to assistive technologies, like screen readers.
215-
// All of the nodes rendered in this tree have a role of 'role'
216-
// </li>
217-
// <li>
218-
// <i><b>internalRole</b></i> refers to browser-specific roles <strong> Chrome </strong> for its own accessibility processing
219-
// </li>
220-
// </ul>
221-
// <p> Each node is given a property labeled <strong>ignored</strong>. Nodes read by the screen reader have their ignored property evaluate to <strong>false</strong>.
222-
// Nodes not read by the screen reader evaluate to <strong>true</strong>.</p>
223-
// <p> Nodes labeled as <strong>no name</strong> are visible to a screen reader, but were not given a name label.</p>
224-
// </div>
225-
// );
226-
case 'accessibility':
227-
steps = [
228-
{
229-
title: 'Accessibility Tree',
230-
element: '.display',
231-
intro:
232-
'<ul><li>Nodes from the accessibility tree have either a role or internalRole</li></ul>',
233-
position: 'top',
234-
},
235-
];
236-
break;
237-
case 'webmetrics':
210+
case 'AxTree':
238211
steps = [
239212
{
240-
title: 'Webmetrics Tab',
241-
element: '.web-metrics-container',
242-
intro: 'This section will show 4 webmetrics for your page when it loads.',
243-
position: 'top',
244-
},
245-
{
246-
title: 'LCP',
247-
element: document.querySelectorAll('.metric')[0],
213+
title: 'Accessibility Tree',
214+
element: '.display',
248215
intro:
249-
'<strong>Largest Contentful Paint</strong><br/>The amount of time it takes for the largest image, video or text block within the viewport to be fully rendered and interactive.',
216+
'<ul><li>Nodes from the accessibility tree have either a role <strong>role</strong> or <strong>internalRole</strong><i><b>Role</b></i> refers to ARIA roles, which indicate the purpose of the element to assistive technologies, like screen readers.All of the nodes rendered in this tree have a role of Role.<i><b>internalRole</b></i> refers to browser-specific roles <strong> Chrome </strong> for its own accessibility processing.<p> Each node is given a property labeled <strong>ignored</strong>. Nodes read by the screen reader have their ignored property evaluate to <strong>false</strong>.Nodes not read by the screen reader evaluate to <strong>true</strong>.</p><p> Nodes labeled as <strong>no name</strong> are visible to a screen reader, but were not given a name label.</p></li></ul>',
250217
position: 'top',
251218
},
252-
219+
];
220+
break;
221+
case 'webmetrics':
222+
steps = [
253223
{
254-
title: 'FID',
255-
element: document.querySelectorAll('.metric')[1],
256-
intro:
257-
'<strong>First Input Delay</strong><br/>A measurement of load responsiveness, the time from the first user interaction (for example, a click) to the browser responding to that interaction.',
224+
title: 'Webmetrics Tab',
225+
element: '.web-metrics-container',
226+
intro: 'Additional info can be found be hovering over desired metrics',
258227
position: 'top',
259228
},
229+
// {
230+
// title: 'LCP',
231+
// element: document.querySelectorAll('.metric')[0],
232+
// intro:
233+
// '<strong>Largest Contentful Paint</strong><br/>The amount of time it takes for the largest image, video or text block within the viewport to be fully rendered and interactive.',
234+
// position: 'top',
235+
// },
260236

261-
{
262-
title: 'FCP',
263-
element: document.querySelectorAll('.metric')[2],
264-
intro:
265-
'<strong>First Contentful Paint</strong><br/>The amount of time it takes to render the first DOM element of any variety',
266-
position: 'top',
267-
},
237+
// {
238+
// title: 'FID',
239+
// element: document.querySelectorAll('.metric')[1],
240+
// intro:
241+
// '<strong>First Input Delay</strong><br/>A measurement of load responsiveness, the time from the first user interaction (for example, a click) to the browser responding to that interaction.',
242+
// position: 'top',
243+
// },
268244

269-
{
270-
title: 'TTFB',
271-
element: document.querySelectorAll('.metric')[3],
272-
intro:
273-
"<strong>Time To First Byte</strong><br/>The amount of time it takes for a user's browser to receive the first byte of page content from the server.",
274-
position: 'top',
275-
},
245+
// {
246+
// title: 'FCP',
247+
// element: document.querySelectorAll('.metric')[2],
248+
// intro:
249+
// '<strong>First Contentful Paint</strong><br/>The amount of time it takes to render the first DOM element of any variety',
250+
// position: 'top',
251+
// },
252+
253+
// {
254+
// title: 'TTFB',
255+
// element: document.querySelectorAll('.metric')[3],
256+
// intro:
257+
// "<strong>Time To First Byte</strong><br/>The amount of time it takes for a user's browser to receive the first byte of page content from the server.",
258+
// position: 'top',
259+
// },
276260
];
277261
break;
278262
case 'history':
@@ -286,7 +270,7 @@ export default class Tutorial extends Component<TutorialProps, TutorialState> {
286270
},
287271
{
288272
title: 'Viewing History Snapshot',
289-
element: document.querySelectorAll('.snapshotNode')[0],
273+
element: '.node active',//document.querySelectorAll('.snapshotNode')[0]
290274
intro:
291275
'Each node will represent a snapshot in the page. <ul><li>A single snapshot will show as a node while multiple snapshots will be represented as a timeline.</li><li>Highlighting over one will show any state changes compared to the previous snapshot. </li><li>Clicking a node will set the snapshot as the current one.</li></ul>',
292276
position: 'top',

src/app/components/StateRoute/AxMap/Ax.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useRef } from 'react';
1+
import React, { useState, useRef, useEffect } from 'react';
22
import { useDispatch } from 'react-redux';
33
import { Group } from '@visx/group';
44
import { hierarchy, Tree } from '@visx/hierarchy';
@@ -9,7 +9,7 @@ import { useTooltip, useTooltipInPortal, defaultStyles } from '@visx/tooltip';
99
import ToolTipDataDisplay from './ToolTipDataDisplay';
1010
import { ToolTipStyles } from '../../../FrontendTypes';
1111
import { localPoint } from '@visx/event';
12-
import { toggleExpanded } from '../../../slices/mainSlice';
12+
import { toggleExpanded, setCurrentTabInApp } from '../../../slices/mainSlice';
1313

1414
const defaultMargin = {
1515
top: 30,
@@ -93,6 +93,7 @@ export default function AxTree(props) {
9393
sizeHeight = innerWidth;
9494
}
9595

96+
9697
const LinkComponent = getLinkComponent({ linkType, orientation });
9798

9899
const currAxSnapshot = JSON.parse(JSON.stringify(axSnapshots[currLocation.index]));
@@ -147,6 +148,10 @@ export default function AxTree(props) {
147148
// Conditionally render ax legend component (RTK)
148149
const dispatch = useDispatch();
149150

151+
useEffect(() => {
152+
dispatch(setCurrentTabInApp('Axtree')); // dispatch sent at initial page load allowing changing
153+
}, [dispatch]);
154+
150155
return totalWidth < 10 ? null : (
151156
<div>
152157
<div className='axControls'>

src/app/components/StateRoute/AxMap/axLinkControls.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const AxLinkControls = ({
1515
const dispatch = useDispatch();
1616
const disableAxTree = () => {
1717
dispatch(toggleAxTree('toggleAxRecord'));
18-
dispatch(setCurrentTabInApp('AxTree'));
1918
setShowTree(false);
2019
setShowParagraph(true);
2120
};

src/app/components/StateRoute/StateRoute.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const StateRoute = (props: StateRouteProps) => {
4242

4343
const enableAxTreeButton = () => {
4444
dispatch(toggleAxTree('toggleAxRecord'));
45-
dispatch(setCurrentTabInApp('AxTree'));
4645
setShowParagraph(false);
4746
setShowTree(true);
4847
};

src/app/containers/TravelContainer.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,6 @@ function TravelContainer(props: TravelContainerProps): JSX.Element {
8585
>
8686
{playing ? 'Pause' : 'Play'}
8787
</Button>
88-
<Button
89-
variant='contained'
90-
className='backward-button'
91-
onClick={() => dispatch(moveBackward(false))}
92-
type='button'
93-
sx={{ height: 25, minWidth: 30, p: 0, mr: 1 }}
94-
aria-label='Backward'
95-
>
96-
<FastRewindIcon className='backward-button-icon' />
97-
</Button>
98-
<Button
99-
variant='contained'
100-
className='forward-button'
101-
onClick={() => dispatch(moveForward(false))}
102-
type='button'
103-
sx={{ height: 25, minWidth: 30, p: 0 }}
104-
aria-label='Forward'
105-
>
106-
<FastForwardIcon className='forward-button-icon' />
107-
</Button>
108-
10988
<Dropdown speeds={speeds} selectedSpeed={selectedSpeed} setSpeed={setSpeed} />
11089

11190
</div>

src/app/styles/layout/_buttonsContainer.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@
8383
box-shadow: 0 0 10px 3px rgba(108, 255, 135, 0.7);
8484
border-radius: 8px;
8585
}
86-
display: flex;
87-
align-items: center;
88-
background: white;
89-
border-top: 1px solid #e5e7eb;
90-
width: 100%;
91-
}
9286

9387
.buttons-wrapper {
9488
display: flex;

0 commit comments

Comments
 (0)