fix(a11y): donation faq (#48941)

* fix: headings for faq titles

* fix: add aria-expanded

* fix: header font
This commit is contained in:
Bruce Blaser
2023-01-05 22:25:18 -08:00
committed by GitHub
parent 008c4e2c4c
commit f995809dd4
2 changed files with 12 additions and 4 deletions

View File

@@ -47,11 +47,13 @@ const FaqItem = (
const [isExpanded, setExpanded] = useState(false);
return (
<div className={`faq-item ${isExpanded ? 'open' : ''}`} key={key}>
<button className='map-title' onClick={() => setExpanded(!isExpanded)}>
<button
className='map-title'
onClick={() => setExpanded(!isExpanded)}
aria-expanded={isExpanded}
>
<Caret />
<h4>
<b>{title}</b>
</h4>
<h3>{title}</h3>
</button>
{isExpanded && (
<>

View File

@@ -526,6 +526,12 @@ a.patreon-button:hover {
margin-inline-start: 0.25em;
}
.faq-item h3 {
font-size: 1rem;
line-height: 1.5;
margin: 0;
}
.faq-item div {
width: 100%;
padding: 10px 15px;