I am using aXe tool to do accessibility testing and it is giving me a red flag because it doesn't like the current value in the id attribute, that is set to "input-1".

Question is how, if possible do I set my own custom Id?

enter image description here

  • you cant - if my understanding is correct, those are managed by the aura framework when rendering lighning namespaced components. if a component has multiple lighing:inputs, it will add input id's input-1, input-2 and so on...
    – glls
    Oct 25, 2018 at 15:48

1 Answer 1


What you see is the Global ID, which is rendered at run-time. You cannot set a Global ID, but only a Local ID (using aura:id).

For more details, refer to Component IDs in Lightning Components Developer Guide.

Every component has a unique globalId, which is the generated runtime-unique ID of the component instance. A global ID (1) is not guaranteed to be the same beyond the lifetime of a component, so it should never be relied on. A global ID can be useful to differentiate between multiple instances of a component or for debugging purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.