Comments (3)
Thanks for looking into the code and making a recommendation.
This function already is a loop, and .id performs faster than jquery .attr()
from andi.
I'm talking about "AndiOverlay.prototype.overlayTableMarkup" in line 1533. The for loop would replace the if statements: "if(role)", "if(id)", "if(headers)", and "if(scope)".
from andi.
Difference in the code:
Original Code ""
scope = $(this).attr("scope");
headers = $(this).attr("headers");
id = this.id;
role = $(this).attr("role");
markupOverlay = $(this).prop("tagName").toLowerCase();
if(role)
markupOverlay += " role=" + role;
if(id)
markupOverlay += " id=" + id;
if(headers)
markupOverlay += " headers=" + headers;
if(scope)
markupOverlay += " scope=" + scope;
New Code
NOTE: markupOverlay would be moved out of the $("#ANDI508-testPage [data-tandi508-colindex]").each(function() area
var attributesToFind = ["scope", "headers", "id", "role"];
for (var a = 0; a < attributesToFind.length; a++) {
var attributeValue = $(this).attr(attributesToFind[a]);
if (attributeValue) {
markupOverlay += attributesToFind[a] + "=" + attributeValue;
}
}
from andi.
Related Issues (20)
- Table Module HOT 2
- Five buttons top-right fail to render correctly HOT 2
- Hosting instance of ANDI HOT 2
- ANDI causes page to reload but the page never reloads HOT 4
- ANDI doesn't load/run on Google sites? HOT 1
- ANDI
- In Firefox: ANDI Output of "-moz-alt-content" for images with alt="" AND missing alt HOT 1
- ANDI seems to be miscalculating contrast ratios HOT 1
- Incorrect font-size in color contrast module HOT 5
- ANDI fails to work on pages running jQuery Slim HOT 3
- ANDI does not launch. HOT 9
- ANDI Has Trouble Picking Up Modals HOT 4
- the url isn't working and did all the troubleshooting and is not work HOT 1
- ANDI, Frontpage, Uncaught Error (Implementation Removed).
- ANDI violates 508c
- SSA
- Links that contain icons with aria-labels are mistakenly skipped in the reading order
- Ace
- Ssa
- SSAgov/ANDI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from andi.