Question
The Select2 control introduces 508 issues, as displayed by the Axe plugin for Chrome. How to make Select2 508-compliant?
My understanding is that there is a project called SelectWoo which makes Select2 (the dropdown control) 508-compliant (accessibility).
But how do SelectWoo's versions map to Select2's? If I'm using Select2 4.0.3, and then need to upgrade, does SelectWoo have its own versions? Is it a separate branch?
We have resolved Select2's 508 compliance issues (without switching to any other alternatives).
All that's necessary is these 4 lines, after the initialization $(field).select2({..}) :
$(".select2-selection").removeAttr("role");
$(".select2-search__field").removeAttr("role");
$(".select2-search__field").attr("aria-label", "textbox");
$(".select2-search__field").attr("type", "text");
This got rid of the 508 errors displayed by Axe on all Select2 field(s) on a given page. If there are multiple Select2's, these 4 lines can be added at the very end of your document.ready, they'll take care of all the control instances at once.
Related
I've imported Module:Documentation and Module:Arguments for custom mediawiki from wikipedia. Unfortunately, Lua indicates template loop inside them on also wiki-native pages like Template:Extension, these are not custom templates or pages. Would like a hint or direction to look into, maybe someone encountered the same problem.
The problem is in Template:Extension docs (probably, Template:Extension/doc). The Module:Documentation in both Russian and English Wikipedias is shorter than 464 lines, so your version is either obsolete or modified.
In Angular Material version 9.0.0 (released today), the default background color changed on the AutoComplete, DatePicker, Input, and Select (see comparison to previous version from docs below).
Can this be easily changed (back to how it was in 8.2.3)? I don't want to start a style debate, but I prefer the no-background of 8.2.3 for my use case; I'd find it hard to upgrade if I couldn't keep it.
Future-traveler reference: this has been changed in the 9.1.0 release, to keep the same clear background by default.
To override, use the "appearance" attribute of a mat-form-field:
<mat-form-field appearance="none">
<mat-select>...</mat-select>
</mat-form-field>
"none" is just an invalid value; other values are 'fill', 'legacy', 'outline', 'standard'.
See https://stackoverflow.com/a/55394544/759567.
Just simply create a custom stylesheet for the input. With the browser debugger tool find the the element which has the background and then simply write
Element{ background-color:transparent;}
Here I am, again. With another question concerning cakephp-2.5 and the plugin 'highcharts'.
I've been looking at the demo's an all the different things I could find were the extendings from the controllers. But... that isn't required because it's a plug, am I right?
So, I have included th plugin to my loadings inside the bootstrap file, and when I'm trying to render my HighChart I'm receiving the following error;
Error: Chart: "1" could not be found. Ensure that Chart Name is the same string that is passed to $this->HighCharts->render() in your view.
But the demos are working fine! Any idea what I f*cked up? The names are the same, I even renamed them to 'asd' ( both! ) and it still doesn't work. ^^"
I know this is an incredibly late response but for the benefit of those still experiencing problems with this, the CakePHP 2.* Highcharts plugin has been updated and is compatible up to CakePHP version 2.5.7.
Do note however that in order to maintain product name consistency throughout the repo, all previous references to "HighCharts" have been changed to "Highcharts" and "high_charts" is now simply "highcharts" . So for eg. you now have to call $this->Highcharts->render() where before you would have used $this->HighCharts->render().
The plugin was not yet compatible with CakePHP 2.5. Right now as we speak the developer is working on a new release for 2.5. :)
In CakePHP 2.5, you can avoid the error above and render your chart by calling it.
For example from within index() within your controller, use:
$this->bar();
In this example, bar() is the name of the function containing your chart.
I am new to struts so this could be a basic concept I am facing problem with.
I have a code which access the ID of util:copyTag inside scriptlet:
<%# taglib uri="/WEB-INF/tlds/copytag.tld" prefix="util" %>
...
...
<util:copyTag id="tablebuffer" >
....
</util:copyTag>
<%
Hashtable h=new Hashtable();
String Key = "key1";
h.put(Key,tablebuffer);
%>
When using this code in eclipse, line h.put(Key,tablebuffer); gives a red marker with popup text:
Multiple annotations found at this line:
- tablebuffer cannot be resolved to a
variable
- tablebuffer cannot be resolved to a
variable
Is it possible to use the ID as a variable, or is there some other way to do this. Actually I was given this code and told that code works fine. However when I configured the code in Eclipse I am facing the mentioned issue.
Kindly help me with this issue.
The only possible answer is:
Never use Scriptlets anymore: they're a bad practice.
Never use Struts1 anymore: it is EOL.
Apache Struts 1 End-Of-Life (EOL) Announcement
The Apache Struts Project Team would like to inform you that the Struts 1.x web framework has reached its end of life and is no longer officially supported.
[...]
We plan to start a new project based on Struts 1. Can we still do so?
Basically yes, but we would not recommend doing so. As long as no code line is written it is very easy to conceptually select an alternative web framework such as Struts 2.
Also, Struts 2 is easier and more powerful... really, if you are starting something new (and not maintaining a huge S1 project), switch to it, or to the alternatives (JSF 2, Spring MVC, and so on)
I've got a full bore copy of jQuery UI in the app, so it doesn't matter if I'm loading from the CDN or locally, all I know is it's loaded. (because if we load from the CDN our only option is to monkeypatch the live version, yes?)
I see from: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.progressbar.js that this.min is unfortunately not a settable option (this.options.max in contrast). I need this.min to be -1 in my case (and yes, application wide, we have discussed this internally on the team and we understand the reason for the jQuery decision, we just need it to be otherwise), so my only options seem to be to monkeypatch the prototype or maintain my own plugin. I also see that they are using the "widget" architecture now, for loading the jQuery UI objects.
In this particular application, my scripts are roughly loaded like so:
/javascripts/lib/jquery.min.js
/javascripts/lib/jquery-ui.min.js
...
/javascripts/company.utils.js
/javascripts/company.helpers.js
...
page level includes of javascript libraries
...
page level javascript
So I'm thinking of going into company.utils.js and define a monkeypatch like so:
$.ui.progressbar.prototype.min = -1;
However, I'm curious if this is the right way to monkeypatch this object. Pretty sure it is, but thought I would ask the wider StackOverflow community, and offer something googlable for future searchers.
Yes, that's correct. Alternatively, if you're using jQuery UI 1.9, you can use the widget factory to define your extension:
$.widget( "ui.progressbar", $.ui.progressbar, {
min: -1
});
Though it is slightly more verbose.