mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 05:34:53 -05:00
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:
@@ -134,6 +134,7 @@ export function registerAngularDirectives() {
|
||||
'isConfigured',
|
||||
'inputWidth',
|
||||
'labelWidth',
|
||||
'aria-label',
|
||||
['onReset', { watchDepth: 'reference', wrapApply: true }],
|
||||
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
||||
]);
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user