Can I change the (html) name of a form button?

0 favourites
  • 1 posts
From the Asset Store
J-BoB Game Button Sound Pack comes with 300 high-quality sound effects
  • I am currently working with form buttons quite intense, in order to make the project I am working on more accessible.

    I ran into a problem where it is not acceptable that a button's (html) name is the same as its text content (on the screen it shows the text an "x", but the screenreader needs to read the name of the button as "close window").

    I noticed that on html webpages, the name and content of a button are different. A button can be called "closewindowbutton" while it shows an "x". I tried to accomplish that by using the "set attribute" command, but I ran into problems. See images below.

    This is my button, test button 1.

    As you see, when I check how it appears in html via the accessibility section in the browser, it shows test button 1 as its name, and also as content on a "text leaflet". Its values is empty.

    Of course, I tried to use the command "set attribute: name", but it has no effect on the button.

    When I, however, use "set attribute: value", it uses this data to set the name and text of the button. The actual value entry stays empty though.

    So I assume Construct somewhat has its own mind on how to make something with the buttons.

    I'd like to know if there is any chance I can actually modify the button's name somehow, or if that is just not possible. Weird though that I can select it as a command, while it does not seem to do anything. Maybe I missed something?!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)