Skip to content

Commit

Permalink
Button: Fix axe errors. Add visibility="hidden" style to submit input (
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderPolosatov authored Sep 6, 2023
1 parent 5363935 commit 4fa9b2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/devextreme/scss/widgets/base/button/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
width: 0;
font-size: 0;
opacity: 0;
visibility: hidden;
}

.dx-state-disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ QUnit.module('Button', function() {
assert.strictEqual(this.$element.find(`.${BUTTON_SUBMIT_INPUT_CLASS}`).length, 1);
});

QUnit.test('submit input has visibility="hidden" style', function(assert) {
const input = this.$element.find(`.${BUTTON_SUBMIT_INPUT_CLASS}`);

assert.strictEqual(input.css('visibility'), 'hidden');
});

QUnit.test('Button should not raise any errors after text option change when useSubmitBehavior is true (T892480)', function(assert) {
this.$element.dxButton('instance').option('text', 'new text');
assert.equal(this.$element.text(), 'new text');
Expand Down

0 comments on commit 4fa9b2b

Please sign in to comment.