Skip to content

sp_flags image flag should have empty alt text #480

Description

@danis039

Given the flag is a decorative element as it's printed next to the country name, its alt text should be empty so it won't be announced to screen readers or displayed in search results.

Here's a Google search result example:

Nationality: rou Romania

By replacing alt="rou" with alt='', we'd get the following result:

Nationality: Romania

The lines affected can be found in wp-content/plugins/sportspress/includes/sp-core-functions.php:

$flag = '<img src="' . $flag_src . '" alt="' . $nationality . '">';
$flag = '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/flags/' . $nationality . '.png" alt="' . $nationality . '">';

Any possibility to fix this? 🚀

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions