ngAria (an accessibility module) is adding an unnecessary bower import to my Angular Material project - and now it is throwing warnings:
Attribute " aria-label ", required for accessibility, is missing on node
I only added ngAria because it appeared necessary for ngMaterial. My app does not need screen-reader accessibility.
Anyways, how can I remove ngAria from ngMaterial? or at least disable all warnings.
EDIT: It seems the only easy way to disable ngAria's warnings is console.warn = function() {};
which will just turn off your browser's warnings (I do not recommend doing this, since it may hide warnings unrelated to aria)
The ngAria module provides support for common ARIA attributes that convey state or semantic information about the application for users of assistive technologies, such as screen readers.
Overview. The $aria service contains helper methods for applying common ARIA attributes to HTML directives. ngAria injects common accessibility attributes that tell assistive technologies when HTML elements are enabled, selected, hidden, and more.
Disabling messages globally is possible as of 1.1.0:
app.config(function($mdAriaProvider) { // Globally disables all ARIA warnings. $mdAriaProvider.disableWarnings(); });
(But do note the discussion in other answers about aria labels being important for accessibility!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With