Skip to content

Commit 747ab73

Browse files
committed
Add focus-visible handling to consent form
1 parent 174d22f commit 747ab73

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

_TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,5 @@ This article has different approaches to [print pagination](https://www.customjs
257257
- Need an article on OpenStack
258258

259259
- Add links to the privacy policy page to go to preferences and my-data
260+
261+
- The four service offerings should be clickable links that take you to the Contact page and pre-fill in the form with the service the person is interested in. The Contact project scopes could have the four services offerings and a "general questions" option.

src/components/Layout/HeadingAnchor/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export type Props = {
66
const { href } = Astro.props
77
---
88

9-
<a class="heading-anchor no-underline hover:no-underline focus-visible:no-underline transition-colors" aria-label="Link to this section" href={href}><span class="anchor-link text-base sm:text-lg" aria-hidden="true">🔗</span></a>
9+
<a class="heading-anchor no-underline hover:no-underline focus-visible:no-underline transition-colors" aria-label="Link to this section" href={href} tabindex="-1"><span class="anchor-link text-base sm:text-lg" aria-hidden="true">🔗</span></a>

src/components/Pages/Consent/index.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const { content } = Astro.props
161161
checked
162162
/>
163163
<div
164-
class="w-11 h-6 bg-content peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
164+
class="w-11 h-6 bg-content rounded-full peer dark:bg-gray-700 peer-focus-visible:outline-2 peer-focus-visible:outline-spotlight peer-focus-visible:outline-offset-2 peer-focus-visible:rounded-none peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
165165
>
166166
</div>
167167
</label>
@@ -189,7 +189,7 @@ const { content } = Astro.props
189189
aria-describedby="consent-preferences__functional-desc"
190190
/>
191191
<div
192-
class="w-11 h-6 bg-content peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
192+
class="w-11 h-6 bg-content rounded-full peer dark:bg-gray-700 peer-focus-visible:outline-2 peer-focus-visible:outline-spotlight peer-focus-visible:outline-offset-2 peer-focus-visible:rounded-none peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
193193
>
194194
</div>
195195
</label>
@@ -220,7 +220,7 @@ const { content } = Astro.props
220220
aria-describedby="consent-preferences__marketing-desc"
221221
/>
222222
<div
223-
class="w-11 h-6 bg-content peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
223+
class="w-11 h-6 bg-content rounded-full peer dark:bg-gray-700 peer-focus-visible:outline-2 peer-focus-visible:outline-spotlight peer-focus-visible:outline-offset-2 peer-focus-visible:rounded-none peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
224224
>
225225
</div>
226226
</label>
@@ -234,19 +234,19 @@ const { content } = Astro.props
234234
<div class="px-6 py-4 flex gap-3 justify-end flex-wrap">
235235
<button
236236
id="consent-allow-all"
237-
class="px-6 py-2 bg-success-offset text-content-inverse rounded-lg hover:bg-success transition-colors duration-200 font-medium"
237+
class="px-6 py-2 bg-success-offset text-content-inverse rounded-lg hover:bg-success transition-colors duration-200 font-medium focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
238238
>
239239
{content.buttons.acceptAll}
240240
</button>
241241
<button
242242
id="consent-deny-all"
243-
class="px-6 py-2 bg-warning-offset text-content-inverse rounded-lg hover:bg-warning transition-colors duration-200 font-medium"
243+
class="px-6 py-2 bg-warning-offset text-content-inverse rounded-lg hover:bg-warning transition-colors duration-200 font-medium focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
244244
>
245245
{content.buttons.rejectAll}
246246
</button>
247247
<button
248248
id="consent-save-preferences"
249-
class="px-6 py-2 text-content-inverse rounded-lg cursor-not-allowed transition-colors duration-200 font-medium"
249+
class="px-6 py-2 text-content-inverse rounded-lg cursor-not-allowed transition-colors duration-200 font-medium focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
250250
disabled
251251
aria-disabled="true"
252252
>

0 commit comments

Comments
 (0)