add selected to description of current presentation in actions dropdown

This commit is contained in:
KDSBrowne 2022-12-15 18:53:41 +00:00
parent 9bf832ca42
commit c37262e2af
2 changed files with 3 additions and 3 deletions

View File

@ -261,6 +261,7 @@ class ActionsDropdown extends PureComponent {
customStyles: p.current ? customStyles : null,
icon: "file",
iconRight: p.current ? 'check' : null,
selected: p.current ? true : false,
label: p.name,
description: "uploaded presentation file",
key: `uploaded-presentation-${p.id}`,

View File

@ -64,8 +64,7 @@ class BBBMenu extends React.Component {
const { actions, selectedEmoji } = this.props;
return actions?.map(a => {
const { dataTest, label, onClick, key, disabled, description } = a;
const { dataTest, label, onClick, key, disabled, description, selected } = a;
const emojiSelected = key?.toLowerCase()?.includes(selectedEmoji?.toLowerCase());
let customStyles = {
@ -101,7 +100,7 @@ class BBBMenu extends React.Component {
<Styled.MenuItemWrapper>
{a.icon ? <Icon iconName={a.icon} key="icon" /> : null}
<Styled.Option aria-describedby={`${key}-option-desc`}>{label}</Styled.Option>
{description && <div className="sr-only" id={`${key}-option-desc`}>{description}</div>}
{description && <div className="sr-only" id={`${key}-option-desc`}>{`${description}${selected ? ' - selected' : ''}`}</div>}
{a.iconRight ? <Styled.IconRight iconName={a.iconRight} key="iconRight" /> : null}
</Styled.MenuItemWrapper>
</Styled.BBBMenuItem>,