Skip to content

Commit

Permalink
feat(chat): Add aria-label to the button
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Sep 30, 2024
1 parent 8180012 commit b5ece9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/devextreme/js/__internal/ui/chat/messagebox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class MessageBox extends DOMComponent<MessageBox, Properties> {
type: 'default',
stylingMode: 'text',
disabled: true,
elementAttr: { 'aria-label': 'Send' },
onClick: (e): void => {
this._sendHandler(e);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ QUnit.module('MessageBox', moduleConfig, () => {
assert.strictEqual($button.hasClass(CHAT_MESSAGEBOX_BUTTON_CLASS), true);
});
});

QUnit.module('Accessibility', moduleConfig, () => {
QUnit.test('send button should have correct aria-label', function(assert) {
const $button = this.$element.find(`.${BUTTON_CLASS}`);

assert.strictEqual($button.attr('aria-label'), 'Send');
});
});
});

0 comments on commit b5ece9e

Please sign in to comment.