Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Alt + href attribute (or fill more than one attribute) #786

Open
@rotkohlsuppe

Description

@rotkohlsuppe

Hi, I'm trying to find a solution for images and the mandatoryalt attribute. And also for even more attributes likearia-labelledby. Thelist.on() function has no listener for onbuild. That's my first problem. I'd like to have an event for after mounted.
If I useon 'updated' my callback function for altering thealt attribute shows success in the console.log but the real list doesn't reflect the changes in the DOM.

Part of the function:

items.forEach((item)=>{constname=item.getElementsByClassName("personname")[0].innerText;constalt=`Potrait von${name}`;constimage=item.getElementsByClassName("portrait")[0];image.alt=alt;console.log("image with new alt:",item,image.alt);});

I'm using the HTML template similar to this example from the website:

<divstyle="display:none;"><!-- A template element is needed when list is empty, TODO: needs a better solution --><liid="hacker-item"><h3class="name"></h3><pclass="city"></p></li></div>

Maybe this doesn't work in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp