mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 19:04:33 -04:00
Don't prefix with the page title on focus
Doing this was helpful to Voiceover users as its announcement of the label meant the page title (normally announced onload) wasn't skipped. This isn't the case with JAWS so, prefixing the title makes it announce it twice. JAWS has a lot more users and the title being announced twice is more confusing than not at all so this removes it.
This commit is contained in:
@@ -50,28 +50,6 @@ describe('Autofocus', () => {
|
||||
|
||||
});
|
||||
|
||||
test('has a label including the page title when the module starts', () => {
|
||||
|
||||
// start module
|
||||
window.GOVUK.modules.start();
|
||||
|
||||
expect(search.hasAttribute('aria-label')).toBe(true);
|
||||
expect(search.getAttribute('aria-label')).toEqual(document.title + ' - ' + labelText);
|
||||
|
||||
});
|
||||
|
||||
test('gets the original label back when focus moves away', () => {
|
||||
|
||||
// start module
|
||||
window.GOVUK.modules.start();
|
||||
|
||||
// shift focus away from textbox
|
||||
helpers.triggerEvent(search, 'blur');
|
||||
|
||||
expect(search.hasAttribute('aria-label')).toBe(false);
|
||||
|
||||
});
|
||||
|
||||
test('is not focused if the window has scrolled', () => {
|
||||
|
||||
// mock the window being scrolled 25px
|
||||
|
||||
Reference in New Issue
Block a user