Skip to content

Commit

Permalink
Improve semantic structure for URL breakdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Dec 31, 2024
1 parent ad82d86 commit 92b44c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/view/url-breakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import * as React from 'react';
import { styled } from '../../styles';
import { ContentLabel } from '../common/text-content';

const BreakdownContainer = styled.div`
const BreakdownContainer = styled.dl`
display: grid;
grid-template-columns: fit-content(50%) auto;
grid-gap: 5px;
`;

const BreakdownKey = styled.div`
const BreakdownKey = styled.dt`
font-family: ${p => p.theme.monoFontFamily};
word-break: break-all;
text-align: right;
`;

const BreakdownValue = styled.pre`
const BreakdownValue = styled.dd`
font-family: ${p => p.theme.monoFontFamily};
word-break: break-all;
white-space: pre-wrap;
Expand All @@ -36,7 +36,7 @@ export const UrlBreakdown = (p: { url: URL }) => {
decodedPathname = p.url.pathname;
}

return <BreakdownContainer>
return <BreakdownContainer role='region'>
<BreakdownKey>Protocol:</BreakdownKey> <BreakdownValue>{ p.url.protocol.slice(0, -1) }</BreakdownValue>

{ (p.url.username || p.url.password) && <>
Expand Down

0 comments on commit 92b44c2

Please sign in to comment.