mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Change method of hiding extra table layer
This module creates a clone of the existing table as an extra layer which sits on top of it. This allows the row headers to sit above the table content when it scrolls. We were setting `role=presentation` on the extra table to hide it from assistive technologies. It seems that this wasn't working. From the spec' `role-presentation` should remove the semantics of the table but leave the content. Testing in Safari, with the OSX Accessibility Inspector, this isn't happening and the table is still being reported as a table by the accessibility API. This changes to the `aria-hidden` attribute, to make sure the extra table is ignored.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
.clone()
|
||||
.addClass('fullscreen-fixed-table')
|
||||
.removeClass('fullscreen-scrollable-table')
|
||||
.attr('role', 'presentation')
|
||||
.attr('aria-hidden', true)
|
||||
)
|
||||
.append(
|
||||
'<div class="fullscreen-right-shadow" />'
|
||||
|
||||
@@ -123,7 +123,7 @@ describe('FullscreenTable', () => {
|
||||
|
||||
expect(tableFrame).not.toBeNull();
|
||||
expect(numberColumnFrame).not.toBeNull();
|
||||
expect(numberColumnFrame.getAttribute('role')).toEqual('presentation');
|
||||
expect(numberColumnFrame.getAttribute('aria-hidden')).toEqual('true');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user