Skip to content

Commit

Permalink
[MA-8]: Added appropriate ARIA attributes in the channel header
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush-chauhan233 committed Dec 4, 2024
1 parent 55bd7de commit be8ac8c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
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

0 comments on commit be8ac8c

Please sign in to comment.