Skip to content

Commit

Permalink
fix: reflect readonly property to attribute (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-Ph authored Mar 18, 2020
1 parent 3492426 commit 28af3ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vaadin-time-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@
*/
readonly: {
type: Boolean,
value: false
value: false,
reflectToAttribute: true
},

/**
Expand Down
5 changes: 5 additions & 0 deletions test/input-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@
});
});

it('should reflect to attribute when readonly property is set', () => {
timePicker.readonly = true;
expect(timePicker.hasAttribute('readonly')).to.be.true;
});

describe('aria', () => {
it('text-field should have the `aria-label` attribute', () => {
expect(timePicker.__inputElement.hasAttribute('aria-label')).to.be.false;
Expand Down

0 comments on commit 28af3ba

Please sign in to comment.