Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
This is same thing, if you're using key then this case is already covered for you by the browser. Then you're good to go!. I was aware of the code thing. But you're correct. I have also added it to the post, huge thanks for pointing this out!.
Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
Greatly agree, this too. Haven't the support for IE stopped? Microsoft has the new Edge as their flagship browser? You guys still are stuck with that monstrosity xD
Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
I work in accessibility and there are still a lot of people stuck on IE due to their screen reader etc. so I still support IE9+ (and by support I mean it all works fine but it might be a bit ugly or clunky in places, perfectly accessible but maybe missing a few "bells and whistles" afforded by modern browsers).
If IE11 support hasn't already stop it is due to soon so for most people it isn't a concern!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I mean, I agree, but the example isn't a good one as really if you are going to use
keyCode
(which is deprecated by the way) then what is wrong with:No memory assignment, no extra bytes in compiled code as comments are removed, readable by a human and no having to name it in the first place.
There is decent support for
.key
so you could use that and make it even easier!Instead magic numbers are things like if you have a function and it has numeric values used for loops etc. it is better to define them at the top:
e.g.
Would be better as the following as it is easy to understand what "52" is!
And even better in ES6 if you aren't stuck in the dark ages like me due to IE9 support 😁
This is same thing, if you're using key then this case is already covered for you by the browser. Then you're good to go!. I was aware of the
code
thing. But you're correct. I have also added it to the post, huge thanks for pointing this out!.Added an example that is more in keeping with magic numbers and the sentiment of your post as I do agree, they are evil!
Greatly agree, this too. Haven't the support for IE stopped? Microsoft has the new Edge as their flagship browser? You guys still are stuck with that monstrosity xD
I work in accessibility and there are still a lot of people stuck on IE due to their screen reader etc. so I still support IE9+ (and by support I mean it all works fine but it might be a bit ugly or clunky in places, perfectly accessible but maybe missing a few "bells and whistles" afforded by modern browsers).
If IE11 support hasn't already stop it is due to soon so for most people it isn't a concern!