Skip to content

Commit

Permalink
Fixed #1796 - InplaceDisplay has no ariaLabel property
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Feb 3, 2021
1 parent 91dad79 commit b9810a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/inplace/Inplace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface InplaceProps {
closable?: boolean;
disabled?: boolean;
tabIndex?: number;
ariaLabel?: string;
onOpen?(event: Event): void;
onClose?(event: Event): void;
onToggle?(e:{originalEvent: Event, value: boolean}): void;
Expand Down
4 changes: 3 additions & 1 deletion src/components/inplace/Inplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class Inplace extends Component {
closable: false,
disabled: false,
tabIndex: 0,
ariaLabel: null,
onOpen: null,
onClose: null,
onToggle: null
Expand All @@ -40,6 +41,7 @@ export class Inplace extends Component {
closable: PropTypes.bool,
disabled: PropTypes.bool,
tabIndex: PropTypes.number,
ariaLabel: PropTypes.string,
onOpen: PropTypes.func,
onClose: PropTypes.func,
onToggle: PropTypes.func,
Expand Down Expand Up @@ -112,7 +114,7 @@ export class Inplace extends Component {
const className = classNames('p-inplace-display', {'p-disabled': this.props.disabled});

return (
<div className={className} onClick={this.open} onKeyDown={this.onDisplayKeyDown} tabIndex={this.props.tabIndex} >
<div className={className} onClick={this.open} onKeyDown={this.onDisplayKeyDown} tabIndex={this.props.tabIndex} aria-label={this.props.ariaLabel}>
{content}
</div>
);
Expand Down

0 comments on commit b9810a2

Please sign in to comment.