tiagoporto / accessibility-buttons Goto Github PK
View Code? Open in Web Editor NEWButtons to add/remove contrast and increase/decrease font size.
Home Page: http://tiagoporto.github.io/accessibility-buttons/
License: MIT License
Buttons to add/remove contrast and increase/decrease font size.
Home Page: http://tiagoporto.github.io/accessibility-buttons/
License: MIT License
Describe the bug
I have imported accessibilityButtons as shown in the README, and it didn't casue any error:
import { accessibilityButtons } from 'accessibility-buttons/dist/js/accessibility-buttons';
But Calling accessibilityButtons() results in error Object(...) is not a function
.
If this library does not work on angular please update your README.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The accessibilityButtons should be initiated
Enviroment (please complete the following information):
** Error message
main.ts:12 TypeError: Object(...) is not a function
at new AppComponent (app.component.ts:42)
at createClass (core.js:24584)
at createDirectiveInstance (core.js:24400)
at createViewNodes (core.js:35006)
at createRootView (core.js:34878)
at callWithDebugContext (core.js:36407)
at Object.debugCreateRootView [as createRootView] (core.js:35644)
at ComponentFactory_.create (core.js:23542)
at ComponentFactoryBoundToModule.create (core.js:19549)
at ApplicationRef.bootstrap (core.js:32042)
I am getting an error in IE Edge that "SCRIPT16389: SCRIPT16389: Unspecified error." It's working on all the browsers except Microsoft Edge.
This is my code:
App.controller('home', function(page){
if(typeof localStorage !== "undefined"){
if (localStorage.getItem("reciepent-list") !== null) {
//var reciepentList = JSON.parse(localStorage.getItem("reciepent-list"));
var reciepentList = localStorage.getItem('reciepent-list') ?
JSON.parse(localStorage.getItem('reciepent-list')) :
[];
$.each(reciepentList, function( index, value ) {
$(page).find("#contactList").append('<div class="app-button redirect">' + value + '</div>');
});
$(page).find("#contact-list").show();
$(page).find(".redirect")
.clickable()
.on("click", function() {
localStorage.setItem("to", $(this).html());
App.load('sendEmail');
});
} else {
$(page).find("#contact-list").hide();
}
}
});
App.controller('sendEmail', function(page){
//alert("sendEmail loaded");
if(typeof localStorage !== "undefined"){
if(localStorage.getItem('from') !== null){
$(page).find('#from').val(localStorage.getItem('from'));
}
}
$(page).find('#send').
clickable().on('click',function(){
if(typeof localStorage !== "undefined"){
localStorage.setItem('from',$('#from').val());
var reciepentList = new Array();
if(localStorage.getItem('reciepent-list') !== null){
reciepentList = JSON.parse(localStorage.getItem('reciepent-list'));
}
if($.inArray($('#to').val(),reciepentList) == -1){
reciepentList.push($('#to').val());
reciepentList.sort();
localStorage.setItem('reciepent-list',JSON.stringify(reciepentList));
//alert("in array");
console.log(reciepentList);
}
}
else{
alert("Email data couldn't be saved");
}
})
});
try{
App.restore();
}
catch(err){
App.load('home');
}
I am getting error in these two lines of code:
if(typeof localStorage !== "undefined"){
if (localStorage.getItem("reciepent-list") !== null) {
How to solve this issue. Any help would be highly appreciated.
Fala Tiago, primeiro parabéns por essa iniciativa muito legal queria deixar uma dica pra você.
Não utilize o atributo title na tag pois nos leitores de tela isso tornara uma informação repetida e para um usuário que não enxerga isso mais atrapalha do que ajuda.
Recomendo utilizar o aria-label resolveria o problema, no caso do botão de aumento e diminuição de fonte, agora o botão de constraste não vejo necessidade porque ele é auto declarativo ele explica o propósito dele.
Lembrando que o atributo aria-label que faz parte da WAI-ARIA já é recomendação da W3C e pode ser usado e o NVDA, JAWS 13 e VoiceOver já interpretam ele, bom espero ter ajudado.
Abraço.
Ao abrir o "Veja como Contribuir" acusa erro 404.
Onde encontra o link:
https://github.com/tiagoporto/accessibility-buttons/blob/master/translations/README.pt_br.md
Para onde ele aponta:
https://github.com/tiagoporto/accessibility-buttons/blob/master/translations/CONTRIBUTING.md
accessibility-buttons/translations/CONTRIBUTING.md/
404 - page not found
The master
branch of accessibility-buttons does not contain the path translations/CONTRIBUTING.md.
For me, the buttons don't do anything.
Hi Tiago!
I hope you are super well,
First of all! Thank you. I'm using your script accessibility buttons, which is excellent.
I would like to know if you could help me with something:
I'm trying to extend the functionality to other elements like data-* or class.
Why? Simple what if i need to put a button in a header and footer or some dummy esthetic thing :P ?
Use the same ID atrib, is like all know, invalid. Both, for the W3c and for all screen readers.
That's why i'm trying to replace the use of the ID by a data-id or class,
I made some adjustments but with no luck. I leave you the Pastebin
Another cool stuff would be use a valid role="switch".
Thank you very much!
I found a bug that when i use just one button the program bugs
I am creating an email app. First fill the from and to fields and then when click send that links via Ajax to a php script which then sends the e-mail and returns true and the app interprets this as a successful send. It will also validate the form before sending and the recipient email addresses which are used automatically appear in the email address list.
Everything is working except the subject and message. The validation for a subject and message is not working, even it's sending the mail without subject and message.
I have attached two files. Please go through the code.
Any help would be appreciated.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.