Accessibility Fixes for Several SQL Based Datasource Config Pages (#43982)

* Add label elements for select boxes: MSSQL config

* Add Permission level label

* Add aria-label for password field

* Fixes for Postgres a11y page

* Fix whitespace error

* Swap aria-labelby for "for"

* Prefer "for" over aria-labeledby
This commit is contained in:
Kyle Cunningham
2022-01-19 15:53:54 -06:00
committed by GitHub
parent 61974383d7
commit febc24522d
6 changed files with 16 additions and 11 deletions
+1
View File
@@ -134,6 +134,7 @@ export function registerAngularDirectives() {
'isConfigured',
'inputWidth',
'labelWidth',
'aria-label',
['onReset', { watchDepth: 'reference', wrapApply: true }],
['onChange', { watchDepth: 'reference', wrapApply: true }],
]);
+3 -3
View File
@@ -168,9 +168,9 @@ function getPropExpression(prop: any) {
* @param attrs All attributes of the component.
* @param propName Name of the prop that react component expects.
*/
function findAttribute(attrs: string, propName: string): string {
const index = Object.keys(attrs).find((attr) => {
return attr.toLowerCase() === propName.toLowerCase() || attr.toLowerCase() === kebabCase(propName);
function findAttribute(attrs: object, propName: string): string {
const index = Object.keys(attrs).find((attr: any) => {
return attr.toLowerCase() === propName.toLowerCase() || kebabCase(attr) === kebabCase(propName);
});
// @ts-ignore
return attrs[index];