JS Console error:

Incorrect use of <label for=FORM_ELEMENT>

Here is the HTML output that generates described JS error:

<audio id="audiofield-audio-player-item-gaaqoo0zf8n0y2fz" preload="none" controls="">
    <source src="https://mysite.com/some.mp3" type="audio/mpeg">
</audio>

<label for="audiofield-audio-player-item-gaaqoo0zf8n0y2fz">Some Label</label>

From HTML documentation:

<label>'s label form controls like <input>, or <select>.

They can't be used to label arbitrary elements like <audio>.

Issue fork audiofield-3374702

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

devad created an issue. See original summary.

devad’s picture

Issue summary: View changes
devad’s picture

Issue summary: View changes
Issue tags: -Incorrect use of <label for=FORM_ELEMENT> +Incorrect use of label html element
devad’s picture

Title: Incorrect use of for=FORM_ELEMENT » Incorrect use of label HTML element
Issue tags: -Incorrect use of label html element
devad’s picture

Issue summary: View changes

astonvictor made their first commit to this issue’s fork.

astonvictor’s picture

Status: Active » Needs review

yeah,

I was able to reproduce the bug in the console.
I replaced all label tags with a regular p tag with a 'description' class.

I also found that there are a lot of strings that don't use |t filter to translate strings in templates. So, I fixed it as well.
thanks

astonvictor’s picture

Status: Needs review » Fixed

merged to dev version

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

devad’s picture

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.