Skip to content

Commit

Permalink
fix(a11y): remove aria-readonly from labels for QField, QCodeol, QDat…
Browse files Browse the repository at this point in the history
…e, QEditor (backport from Qv2) quasarframework#16705
  • Loading branch information
pdanpdan committed Dec 18, 2023
1 parent cfa7f06 commit 58278c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
9 changes: 3 additions & 6 deletions ui/src/components/color/QColor.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,9 @@ export default Vue.extend({
},

attrs () {
if (this.disable === true) {
return { 'aria-disabled': 'true' }
}
if (this.readonly === true) {
return { 'aria-readonly': 'true' }
}
return this.disable === true
? { 'aria-disabled': 'true' }
: void 0
}
},

Expand Down
9 changes: 3 additions & 6 deletions ui/src/components/date/QDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,12 +666,9 @@ export default Vue.extend({
},

attrs () {
if (this.disable === true) {
return { 'aria-disabled': 'true' }
}
if (this.readonly === true) {
return { 'aria-readonly': 'true' }
}
return this.disable === true
? { 'aria-disabled': 'true' }
: void 0
}
},

Expand Down
9 changes: 3 additions & 6 deletions ui/src/components/editor/QEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,9 @@ export default Vue.extend({
},

attrs () {
if (this.disable === true) {
return { 'aria-disabled': 'true' }
}
if (this.readonly === true) {
return { 'aria-readonly': 'true' }
}
return this.disable === true
? { 'aria-disabled': 'true' }
: void 0
},

onEditor () {
Expand Down
3 changes: 0 additions & 3 deletions ui/src/components/field/QField.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ export default Vue.extend({
if (this.disable === true) {
attrs['aria-disabled'] = 'true'
}
else if (this.readonly === true) {
attrs['aria-readonly'] = 'true'
}

return attrs
}
Expand Down

0 comments on commit 58278c2

Please sign in to comment.