fix: [APER-1936] Changes for a11y review (#71)
* fix: [APER-1936] Changes for a11y review - Fixes skip nav link to work properly - inline styles pending tasks link - adds <main> - adds sr-only span to "view message" links in task history table - header/footer updated in seperate PR * chore: add sr-only span to unit test * fix: fix space before sr-only span"
This commit is contained in:
@@ -18,13 +18,13 @@ export default function BulkEmailTool() {
|
||||
return (
|
||||
<CourseMetadataContext.Consumer>
|
||||
{(courseMetadata) => (courseMetadata.originalUserIsStaff ? (
|
||||
<div>
|
||||
<>
|
||||
<NavigationTabs courseId={courseId} tabData={courseMetadata.tabs} />
|
||||
<BulkEmailProvider>
|
||||
<Container size="md">
|
||||
<BackToInstructor />
|
||||
<div className="row pb-4.5">
|
||||
<h1 className="text-primary-500">
|
||||
<h1 className="text-primary-500" id="main-content">
|
||||
<FormattedMessage
|
||||
id="bulk.email.send.email.header"
|
||||
defaultMessage="Send an email"
|
||||
@@ -40,7 +40,7 @@ export default function BulkEmailTool() {
|
||||
</div>
|
||||
</Container>
|
||||
</BulkEmailProvider>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<ErrorPage />
|
||||
))}
|
||||
|
||||
@@ -109,6 +109,7 @@ function BulkEmailContentHistory({ intl }) {
|
||||
Cell: ({ row }) => (
|
||||
<Button variant="link" className="px-1" onClick={() => onViewMessageClick(tableData[row.index])}>
|
||||
{intl.formatMessage(messages.buttonViewMessage)}
|
||||
<span className="sr-only"> {row.index}</span>
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@ export default function BulkEmailPendingTasksAlert() {
|
||||
<Hyperlink
|
||||
destination={`${getConfig().LMS_BASE_URL}/courses/${window.location.pathname.split('/')[2]}/instructor#view-course-info`}
|
||||
target="_blank"
|
||||
isInline
|
||||
showLaunchIcon={false}
|
||||
>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -71,6 +71,8 @@ describe('BulkEmailContentHistory component', () => {
|
||||
expect(await screen.findByText(email.requester)).toBeTruthy();
|
||||
expect(await screen.findByText(email.sent_to.join(', '))).toBeTruthy();
|
||||
expect(await screen.findByText(email.email.subject)).toBeTruthy();
|
||||
// verify screen reader only <span />
|
||||
expect(await screen.findByText('0')).toHaveClass('sr-only');
|
||||
expect(await screen.findAllByText('View Message')).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -65,7 +65,9 @@ export default function PageContainer(props) {
|
||||
courseNumber={courseMetadata.number}
|
||||
courseTitle={courseMetadata.title}
|
||||
/>
|
||||
{children}
|
||||
<main>
|
||||
{children}
|
||||
</main>
|
||||
<Footer />
|
||||
</>
|
||||
</CourseMetadataContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user