How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A Florence company that sells online to consumers can now be asked by a national authority how accessible its website or app is. I am Mariusz Szatkowski, a developer in Gdynia who works remotely and by email. I am no lawyer. The legal question of whether a business is covered goes to your adviser. The PHP question of how forms, checkouts and error messages behave is mine.

Inside the Mercato Centrale in Florence, a view of the city and not a client reference. Photograph by Sailko, licensed CC BY 3.0, from Wikimedia Commons.
AgID, the Agency for Digital Italy, names two sources on its accessibility page. One is Legge 4/2004, whose tasks AgID carries out. The other is D.Lgs. 82/2022, which transposes the European Accessibility Act, Directive (EU) 2019/882, and designates AgID as the supervisory authority for the digital services it covers. AgID adopted guidelines under article 21 of the decree: version 1.0 of 4 March 2026 covers the accessibility of services.
For a private company the decree is the main one. Legge 4/2004 reaches private entities only above a very high turnover, described below.
Only if you provide one of the services it lists. AgID’s guidelines name six categories: electronic communications, services giving access to audiovisual media, passenger transport by air, bus, rail and waterway, consumer banking, e-books with dedicated software, and e-commerce.
AgID defines e-commerce services as services provided at a distance, through websites and mobile services, electronically and at the individual request of a consumer in order to conclude a consumer contract. The words “consumer contract” matter. A wholesale portal where only businesses order does not fit that wording on its face, and the guidelines do not say how such a portal is treated, so I do not guess.
Two limits apply to the scope:
Article 3(1-bis) of Legge 4/2004 extends the law to legal entities that offer services to the public through websites or mobile apps and had average turnover above 500 million euro over the last three years. AgID applies a fine of up to 5 percent of turnover to those entities for breaching the obligations of article 24(1) of the decree.
AgID also states that from 28 June 2025, providers of the digital services in the decree are no longer bound by several Legge 4/2004 provisions: the older technical guidelines for IT tools, the disproportionate burden rules for websites, the accessibility declaration, the implementation procedure, the ban on contracting non-conforming sites and the old adjustment deadline. On its FAQ page AgID puts it plainly for private firms: those that fall under article 3(1-bis) and are economic operators of services under D.Lgs. 82/2022 no longer file the accessibility declaration.
The result is that most Florence retailers and service firms are not looking at a declaration to publish. They are looking at a duty to provide an accessible service and to keep the information that proves it.
The guidelines turn the decree into a list of duties. In summary:
The decree gives a presumption of conformity. AgID quotes it: services that conform to harmonised standards whose references are published in the Official Journal of the European Union are considered conforming to the requirements those standards cover.
AgID’s guidelines describe EN 301 549 as the reference standard. Its clauses 9.1 to 9.4 for web pages list requirements equivalent to WCAG 2.1 level AA, and AgID says a service must meet at least levels A and AA to count as conforming. The sample checklists in the annex cite EN 301 549 v3.2.1 and WCAG 2.1. They are examples a provider may send AgID when demonstrating conformity, and AgID may ask for more. WCAG 2.2 is not named in these documents, so I build to 2.1 AA as the floor and treat anything beyond it as an extra.
Most criteria are about markup, contrast and focus, which sit in templates and CSS. The server side matters in three places the checklists name:
A small helper keeps error output consistent and escaped. PHP documents that htmlspecialchars defaults to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, which covers both quote types. This sketch pairs the message with its field through a fixed identifier:
<?php
declare(strict_types=1);
function field_error(string $field, string $message): string
{
$text = htmlspecialchars($message, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
return '<p id="' . $field . '-error" class="field-error">' . $text . '</p>';
}
// The input carries aria-describedby="email-error" and aria-invalid="true"
echo field_error('email', 'Enter an email address such as name@example.com');The $field argument must come from the code, never from user input. The sketch shows the pattern. Whether a screen reader reads the message as expected is a test with a screen reader, not a property of the helper.
Yes, and it is unusual. The guidelines say providers must avoid tracking, through their own or third-party systems, of the tools, solutions and settings that help people with disabilities use digital services. AgID names cookies and browser fingerprinting as techniques that could reveal a disability. Providers must state among the mandatory information that they do not use web tracking from which a disability could be inferred.
For a PHP application this is a rule about what not to log. Do not store accessibility preferences, assistive technology hints or display settings in analytics, and keep them out of server logs and fingerprint scripts. The statement belongs on the information page only if the build really supports it.
The decree applies the requirements only to the extent that compliance does not force a substantial change to the nature of the service and does not impose a disproportionate burden. The provider makes the assessment, bases the burden test on Annex V and documents it. AgID’s guidelines add the following:
Annex V weighs, among other things, net costs against total costs of providing the service and against net turnover. A PHP supplier cannot decide this for you. I can give a realistic list of the work behind each defect, which is the evidence the assessment needs.
Under the guidelines a consumer who finds that a service cannot be used because of a disability can file a complaint with AgID, naming the service, the site address or app name and the reason. After a formal check, AgID contacts the provider and asks for cooperation on the substance, a phase the guidelines call mandatory. AgID can ask for complete documentation showing conformity for each applicable element, and may ask for additions or changes to the service.
Keeping the evidence in the repository is the practical answer: the checklist results, the test dates, the version of the application tested and the fixes that followed.
Four answers set the scope:
Describe the application, who buys through it and what has been tested so far on the contact page. An estimate in writing costs nothing, and the first reply by email comes within 24 hours on working days. Other PHP work, from API integrations to version upgrades, is on the PHP developer page.
Examples of my work.
pluginfinance.com is a modern, highly scalable WordPress-based service dedicated to showcasing and distributing financial plugins. The project was designed w...
Radio.friko.pl is an internet radio station that operated between 2005 and 2010 as part of the Friko.pl platform, offering users access to music streaming, l...
Terazjemy.pl is an online platform designed to promote a healthy lifestyle by providing users with practical information, recipes, and tips on balanced nutri...
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.