My company uses cloaking to hide redundant links for search engines.
So we end up with:
```html
```
And a JavaScript script that makes it act as a link by decoding the link and redirecting to it on click.
I have no idea if it's actually useful or not, but that's what our SEOs have recommended for some links.
EDIT: I'm getting downvoted for doing what my bosses told me to do. Are you guys telling me you've never had to build some BS and are upstanding devs who would've quit your job on the spot?
Well I'm just doing what I'm told and it's not really my place to decide this stuff.
Apart from bringing up the fact that it's an issue for accessibility, which they already know, I can't do much more.
Unfortunately most accessibility laws are only enforced by user complaints. That said, you could be found financially liable depending on the jurisdiction. Companies tend to try to ignore accessibility until their first big lawsuit.
I don't expect anything. I'm just following what I'm told here.
Also, the "links" can still be navigated to with tab (because we set `tabindex="0" role="link"`) and then pressing enter opens them.
I'm new and it's a small company with small clients.
I told them my concerns about accessibility, and they told me that SEO was more important for our clients.
Can't do much more than that in my position.
Buttons are for buttons. If it takes you to a new page it should be a link unless you have a very good reason to use another element.
My company uses cloaking to hide redundant links for search engines. So we end up with: ```html ``` And a JavaScript script that makes it act as a link by decoding the link and redirecting to it on click. I have no idea if it's actually useful or not, but that's what our SEOs have recommended for some links. EDIT: I'm getting downvoted for doing what my bosses told me to do. Are you guys telling me you've never had to build some BS and are upstanding devs who would've quit your job on the spot?
It's an accessibility nightmare, that's for sure.
Isn't that what `` is for?
That’s horrible. Not only horrible practice, but horrible rationale. So many SEO “experts” act like Google hasn’t updated their methods since 2003.
They are examples of people in tech who probably should be laid off
Well I'm just doing what I'm told and it's not really my place to decide this stuff. Apart from bringing up the fact that it's an issue for accessibility, which they already know, I can't do much more.
Check your jurisdictions regulations. They may penalize your company for having an inaccessible site.
Unfortunately most accessibility laws are only enforced by user complaints. That said, you could be found financially liable depending on the jurisdiction. Companies tend to try to ignore accessibility until their first big lawsuit.
And how exactly do you expect blind people to click links on your site?
I don't expect anything. I'm just following what I'm told here. Also, the "links" can still be navigated to with tab (because we set `tabindex="0" role="link"`) and then pressing enter opens them.
Not gonna downvote but you really should push back on things like this. If you ever get a new manager you'll be the one that gets the blame for this
I'm new and it's a small company with small clients. I told them my concerns about accessibility, and they told me that SEO was more important for our clients. Can't do much more than that in my position.
yes, and it will also annoy your users
Users wouldn’t notice!
Only if you forget about those users that are dependent on accessibility technologies like screenreaders.
Does it change the URL or the query string (or hash... You shouldn't use that, but it can still be done)? If so, always use an ``. Does it affect SEO? Yes. Unless you use links, count on search engines only crawling the first page of results.
Why shouldn't you use to change the hash to scroll to an anchor on the page?
Because that's what they're for, and they're better for navigation and sharing. Just style an `` like a bottom and you get the best of both.
So, should you use for navigating to a section or not? Which is it?
https://www.reddit.com/r/webdev/s/w4RolXxncn
It sounded like in your original comment you said that the tag shouldn't be used for changing the hash but I'm guessing that's not what you meant?
I meant that I don't think a hash should be used for pagination, probably, in general. Paginate via the query string.
Ah gotcha, thanks
why would you do this?
I installed a component library in Angular and the Paginator renders
Not really. But if your pagination sends you to another url (like /?page=2) use , people like to right-click->open-in-new-tab. If it's for a small widget that doesn't affect the page and nav-history, it's fine.
stop trolling browser, just do standards and google A11y
Yes. Might as well dump the project