• There is a wrong setting of the element <div class="wpcf7 js" lang=""> in language parameter. It also affect the translation <form aria-label="">. This is an accessibility issue.

    • wrong: CF7 form sets the language of the form on the frontend depending on user settings (users > profile > language).
    • correct: The form should set the language depending on the site settings (settings > general > site language). If the site is multilingual, the form should respect the language of the page.

    When I have general settings in english, but editor has spanish user settings, the web page has lang=”en-US”, but CF7 has lang=”es-ES”.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter Michaela Vranková

    (@vrankova)

    Hello.

    Here is web: https://misa.vrankova-devel2.cz/subdom/misa/kontakt/

    There are 3 identical forms on the page. Parameter Lang is Spanish, Czech and Slovak:

    The language setting of the form is depending on what language I set for the user who created the form.

    Page language lang=”en-SK”

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    The forms are seemingly working correctly. If you see the language of the aria-label attribute value as a problem, it depends on the locale of the form.

    See Contact form in your language for details of how to create a localized contact form. If you look for a simple plugin for multilingual site management, I recommend Bogo.

    Thread Starter Michaela Vranková

    (@vrankova)

    The problem is that the form takes the locale of the form from user settings not from global site settings. It makes accessibility issue.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Could you tell us why you think deciding the form locale based on the authoring user’s locale is a problem?

    Thread Starter Michaela Vranková

    (@vrankova)

    I think that if the pages are in a given language, the form on this site should also respect that language, i.e. the global settings. For example, I made a website in Slovak. I had the WordPress environment set to Czech. If I hadn’t checked the accessibility – i.e. aria-label and studied the code of the page, I wouldn’t have found out that the form on the page has the language set to Czech. And I think that’s a problem.


    A lot of developers don’t look at the output code of the site and so they may not find out that it’s different than they wanted.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Accessibility issue – wrong lang=”” and aria-label’ is closed to new replies.