Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MA-8]: Added appropriate ARIA attributes in the channel header #9

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,50 +132,45 @@ const ChannelHeaderTitle = ({
<div
id='channelHeaderDropdownButton'
>
<button
className={classNames('channel-header__trigger style--none', {active: titleMenuOpen})}
aria-label={intl.formatMessage({id: 'channel_header.menuAriaLabel', defaultMessage: 'Channel Menu'}).toLowerCase()}
<strong
role='heading'
aria-level={2}
id='channelHeaderTitle'
className='heading'
ref={headerItemRef}
>
{showTooltip ? (
<WithTooltip
id='channelHeaderTooltip'
placement='bottom'
title={channelTitle as string}
>
<strong
role='heading'
aria-level={2}
id='channelHeaderTitle'
className='heading'
ref={headerItemRef}
<button
id='channel_header.menuAriaLabel'
className={classNames('channel-header__trigger style--none', {active: titleMenuOpen})}
aria-label={intl.formatMessage({id: 'channel_header.menuAriaLabel', defaultMessage: 'Channel Menu'}).toLowerCase()}
aria-expanded={titleMenuOpen ? 'true' : 'false'}
aria-controls='channelHeaderDropdownMenu'
>
{showTooltip ? (
<WithTooltip
id='channelHeaderTooltip'
placement='bottom'
title={channelTitle as string}
>
<span>
{archivedIcon}
{channelTitle}
{sharedIcon}
</span>
</strong>
</WithTooltip>
) : (
<strong
role='heading'
aria-level={2}
id='channelHeaderTitle'
className='heading'
ref={headerItemRef}
>
</WithTooltip>
) : (
<span>
{archivedIcon}
{channelTitle}
{sharedIcon}
</span>
</strong>
)}
<span
id='channelHeaderDropdownIcon'
className='icon icon-chevron-down header-dropdown-chevron-icon'
/>
</button>
)}
<span
id='channelHeaderDropdownIcon'
className='icon icon-chevron-down header-dropdown-chevron-icon'
/>
</button>
</strong>
</div>
<ChannelHeaderDropdown/>
</MenuWrapper>
Expand Down
1 change: 1 addition & 0 deletions webapp/channels/src/sass/layout/_headers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
.heading {
overflow: hidden;
align-self: center;
padding: 4px;
margin: 0 0 0 2px;
color: var(--center-channel-color);
font-family: Metropolis, sans-serif;
Expand Down
Loading