To create accessible truncated text, it’s crucial to consider both the visual presentation and accessibility implications. Here are key points and techniques to achieve this.
Continue reading “Truncating text and making it accessible”Redirecting to www or non-www using Apache htaccess
Redirecting the domain to a www or non-www URL can help with URL canonicalization by search engines – the process by which a search engine selects which version of your site’s URL to display in search results.
Continue reading “Redirecting to www or non-www using Apache htaccess”Website Accessibility: Separating Myths from Facts
When auditing a website for accessibility, it’s crucial to distinguish between common myths and the facts. Let’s debunk some prevalent myths and present accurate, enlightening information about web accessibility.
Continue reading “Website Accessibility: Separating Myths from Facts”Alternative text for CSS generated content
The majority of content on the web is conveyed using HTML. However, CSS may also be used to insert content into a web page.
But how do we actually make the CSS content
property accessible for screen readers?
macOS – find, start, stop, and restart the Apache web server
Trying to find out if the Apache server is running on macOS? How to find it? And once you find it, why are there several methods to start, stop and restart it? You may feel lost. Let’s sort this out.
Continue reading “macOS – find, start, stop, and restart the Apache web server”The intersection between SEO and Digital Accessibility
Making sure your website is accessible to everyone is important not just for fairness, but also for improving its online presence. Accessibility isn’t just a fancy extra feature, it’s a crucial part of creating a good website. When you focus on making your site accessible, you also improve its chances of being found by search engines, which benefits both your users and your site’s ranking.
Continue reading “The intersection between SEO and Digital Accessibility”Resolving the script tag type attribute hash prepending issue with Cloudflare
If your script
HTML tag has the type
attribute prepended with a hash, like <script type="ea10e272b0a1989fb2f3aa4e-text/javascript">...</script>
and you’re using Cloudflare services, then the root cause is the Cloudflare Rocket Loader, a feature of Cloudflare that optimizes the loading of JavaScript resources on your web pages.
Rocket Loader modifies the type
attribute of script
tags for website loading optimization by deferring the loading of JavaScript until after rendering. This modification can sometimes cause issues with HTML validation and Content Security Policy (CSP) headers.
Cloudflare Rocket Loader adds an argument “type” into the script
tag and causing issues with the W3C validator due to the “subtype missing” error.
Remove trailing slashes in WordPress using htaccess
To remove trailing slashes from all WordPress URLs using .htaccess
, you should add a specific rule before the WordPress rewrite rules. This ensures that the rule is processed before WordPress’s own rewrite rules, which are crucial for the site’s functionality.
If you just want to remove the trailing slashes from posts, proceed to Step 2: Update Permalinks.
Continue reading “Remove trailing slashes in WordPress using htaccess”Get days between two dates in JavaScript
To get the number of days between two given dates, you can do that by converting them to UTC timestamps and then computing the difference in days based on the millisecond difference.
Continue reading “Get days between two dates in JavaScript”Get and capitalize the first letter of a string in JavaScript
To covert a first letter in the string to upper case we need to use toLocaleUpperCase
and taking the surrogate pairs into account.