Skip to content

Commit

Permalink
feat(spacelistmeeting): optional button aria label different from but…
Browse files Browse the repository at this point in the history
…ton label (#724)

Co-authored-by: Priyank Saroha -X (prsaroha - ALTRAN ACT at Cisco) <prsaroha@partnet.cisco.com>
Co-authored-by: Yan-Jen Lo <34595328+yjlo@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 16, 2020
1 parent 38d5bf6 commit cdae7a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion react/src/lib/SpaceListMeeting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SpaceListMeeting extends React.PureComponent {
render() {
const {
attendees,
buttonAriaLabel,
buttonLabel,
childrenLeft,
childrenRight,
Expand Down Expand Up @@ -116,7 +117,7 @@ class SpaceListMeeting extends React.PureComponent {
{buttonLabel && (
<Button
color={isMessagingOnlyShare ? 'blue' : 'green'}
ariaLabel={buttonLabel}
ariaLabel={buttonAriaLabel ? buttonAriaLabel : buttonLabel}
children={buttonLabel}
onClick={this.handleButtonClick}
size={28}
Expand Down Expand Up @@ -154,6 +155,8 @@ SpaceListMeeting.propTypes = {
node: PropTypes.element,
})
),
/** @prop Aria label string for button | buttonLabel */
buttonAriaLabel: PropTypes.string,
/** @prop Label string for button | '' */
buttonLabel: PropTypes.string,
/** @prop Callback function invoked when user clicks on button | null */
Expand Down Expand Up @@ -186,6 +189,7 @@ SpaceListMeeting.propTypes = {

SpaceListMeeting.defaultProps = {
attendees: [],
buttonAriaLabel: null,
buttonLabel: '',
buttonOnClick: null,
childrenLeft: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ShallowWrapper {
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): <SpaceListMeeting
attendees={Array []}
buttonAriaLabel={null}
buttonLabel=""
buttonOnClick={null}
childrenLeft={null}
Expand Down

0 comments on commit cdae7a4

Please sign in to comment.