Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
How to add text around dynamically assigned aria labels with Vue JS

I am very new to vue.js and accessibility,

I am trying to make an element be announced by the screen reader as ("This is " + person.name).

I was able to announce the person.name with :aria-label="person.name" but I am not able to add text around this.

How do I add text around the dynamically assigned :aria-label?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Did you try with :aria-label="'This is ' + person.name"

new Vue({
  el: "#demo",
  data() {
    return {
      person: { name: "Logan" }
    }
  },
  mounted() {
    console.log(this.$refs.btn)
  }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="demo">
<button ref="btn" :aria-label="'This is ' + person.name">name</button>
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!