Skip to content

Commit 5c38de7

Browse files
robkerrybjsscolinrotherham
authored andcommitted
Address review comments (sonar)
1 parent 737c284 commit 5c38de7

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

docs/upgrade-to-6.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ To align with NHS.UK frontend, the skip link component focuses the main content
453453
```html
454454
<main class="nhsuk-main-wrapper" id="maincontent">
455455
<!-- // ... -->
456+
</main>
456457
```
457458

458459
For accessibility reasons, you must make the following changes:

src/components/content-presentation/notification-banner/__tests__/NotificationBanner.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,16 @@ describe('NotificationBanner', () => {
268268
<NotificationBanner.Heading>4 files uploaded</NotificationBanner.Heading>
269269
<ul>
270270
<li>
271-
<NotificationBannerLink>government-strategy.pdf</NotificationBannerLink>
271+
<NotificationBannerLink>file.pdf</NotificationBannerLink>
272272
</li>
273273
<li>
274-
<NotificationBannerLink>government-strategy-v2.pdf</NotificationBannerLink>
274+
<NotificationBannerLink>file-v2.pdf</NotificationBannerLink>
275275
</li>
276276
<li>
277-
<NotificationBannerLink>government-strategy-v3-FINAL.pdf</NotificationBannerLink>
277+
<NotificationBannerLink>file-v3-FINAL.pdf</NotificationBannerLink>
278278
</li>
279279
<li>
280-
<NotificationBannerLink>government-strategy-v4-FINAL-v2.pdf</NotificationBannerLink>
280+
<NotificationBannerLink>file-v4-FINAL-v2.pdf</NotificationBannerLink>
281281
</li>
282282
</ul>
283283
</NotificationBanner>,
@@ -359,7 +359,7 @@ describe('NotificationBanner', () => {
359359
const [notificationBannerEl] = modules;
360360

361361
expect(notificationBannerEl?.getAttribute('role')).toBe('region');
362-
expect(notificationBannerEl?.getAttribute('data-disable-auto-focus')).toBe(null);
362+
expect(notificationBannerEl?.dataset?.disableAutoFocus).toBe(undefined);
363363
});
364364

365365
it('has alert role', async () => {
@@ -385,6 +385,6 @@ describe('NotificationBanner', () => {
385385

386386
const [notificationBannerEl] = modules;
387387

388-
expect(notificationBannerEl?.getAttribute('data-disable-auto-focus')).toBe('true');
388+
expect(notificationBannerEl?.dataset?.disableAutoFocus).toBe('true');
389389
});
390390
});

src/components/content-presentation/notification-banner/__tests__/__snapshots__/NotificationBanner.test.tsx.snap

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,28 +456,28 @@ exports[`NotificationBanner matches snapshot with list (via server) 1`] = `
456456
<a
457457
class="nhsuk-notification-banner__link"
458458
>
459-
government-strategy.pdf
459+
file.pdf
460460
</a>
461461
</li>
462462
<li>
463463
<a
464464
class="nhsuk-notification-banner__link"
465465
>
466-
government-strategy-v2.pdf
466+
file-v2.pdf
467467
</a>
468468
</li>
469469
<li>
470470
<a
471471
class="nhsuk-notification-banner__link"
472472
>
473-
government-strategy-v3-FINAL.pdf
473+
file-v3-FINAL.pdf
474474
</a>
475475
</li>
476476
<li>
477477
<a
478478
class="nhsuk-notification-banner__link"
479479
>
480-
government-strategy-v4-FINAL-v2.pdf
480+
file-v4-FINAL-v2.pdf
481481
</a>
482482
</li>
483483
</ul>
@@ -638,7 +638,9 @@ exports[`NotificationBanner matches snapshot with lots of content (via server) 1
638638
Check if you need to apply the reverse charge to this application
639639
</h3>
640640
<p>
641-
You will have to apply the
641+
You will have to apply the
642+
<!-- -->
643+
642644
<a
643645
class="nhsuk-notification-banner__link"
644646
>
@@ -687,7 +689,8 @@ exports[`NotificationBanner matches snapshot with lots of content 1`] = `
687689
Check if you need to apply the reverse charge to this application
688690
</h3>
689691
<p>
690-
You will have to apply the
692+
You will have to apply the
693+
691694
<a
692695
class="nhsuk-notification-banner__link"
693696
>

0 commit comments

Comments
 (0)