Skip to content

Commit

Permalink
a11y: resolve issues in Notifications page (#2343)
Browse files Browse the repository at this point in the history
* resolve issues in Notifications page

This addresses a few minor problems that were causing a11y issues.

* Update index.tsx

* Update index.js

Co-authored-by: Andy Brown <asbrown002@gmail.com>
  • Loading branch information
beyackle and a-b-r-o-w-n authored Mar 23, 2020
1 parent 1034aef commit 5e6a9e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Composer/packages/client/src/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Header = props => {
<img
style={{ marginLeft: '9px', marginTop: '6px' }}
alt={formatMessage('Composer Logo')}
ariaLabel={formatMessage('Composer Logo')}
aria-label={formatMessage('Composer Logo')}
src={composerIcon}
/>
<span css={title}>{formatMessage('Bot Framework Composer')}</span>
Expand Down
2 changes: 2 additions & 0 deletions Composer/packages/client/src/components/Pagination/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { jsx } from '@emotion/core';
import { DefaultButton } from 'office-ui-fabric-react/lib/Button';
import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';
import { useState, useEffect } from 'react';
import formatMessage from 'format-message';

import { container, dropdownStyles, text } from './style';

Expand Down Expand Up @@ -57,6 +58,7 @@ export const Pagination: React.FC<IPaginationProps> = props => {
styles={dropdownStyles}
selectedKey={`page${index + 1}`}
onChange={handlePageSelected}
ariaLabel={formatMessage('Page number')}
/>
<span css={text}>of {pageCount}</span>
<DefaultButton text="Next >" allowDisabledFocus onClick={hangleNextClick} disabled={index === pageCount - 1} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const NotificationHeader: React.FC<INotificationHeader> = props => {
options={createOptions()}
styles={dropdownStyles}
data-testid="notifications-dropdown"
ariaLabel={formatMessage('Notification type')}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const columns: IColumn[] = [
},
},
{
key: 'Notification Type',
key: 'NotificationType',
name: 'Type',
className: notification.columnCell,
fieldName: 'type',
Expand All @@ -59,7 +59,7 @@ const columns: IColumn[] = [
isPadded: true,
},
{
key: 'Notification Location',
key: 'NotificationLocation',
name: 'Location',
className: notification.columnCell,
fieldName: 'location',
Expand All @@ -73,7 +73,7 @@ const columns: IColumn[] = [
isPadded: true,
},
{
key: 'Notification Detail',
key: 'NotificationDetail',
name: 'Message',
className: notification.columnCell,
fieldName: 'message',
Expand Down

0 comments on commit 5e6a9e9

Please sign in to comment.