Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I add a label to the livesearch macro html?

I need to add a label to the html form, which is produced by the livesearch macro to make the page accessible/508 compliant:

Example of what could be added: <input type="text" name="search" aria-label="Search">

Current Code produced by livesearch which is missing the "search" label: 

<div class="search-macro search-macro-medium">
<div class="aui-dd-parent"></div>
<form class="aui aui-dd-parent" name="livesearchForm" method="POST" action="/confluence/dosearchsite.action" _lpchecked="1">
<fieldset class="search-macro-fields">
<div class="search-macro-query">
<input class="text" type="text" name="queryString" autocomplete="off" placeholder="Search">
<button type="submit" class="search-macro-button aui-button"> <span class="aui-icon aui-icon-small aui-iconfont-search">Search</span> </button>
<input type="hidden" name="where" value="IRBO">
<input type="hidden" name="additional" value="space name">
<input type="hidden" name="labels" value="">
<input type="hidden" name="contentType" value="">


2 answers

0 votes

Hello Jeremy,

Welcome to Atlassian Community. It's nice to meet you.

Can you help me to understand what you're trying to do here? You can add a label to the parameters of the Livesearch Macro in order to limit your search results to a specific label. However, I'm not really sure what you are referring to when you mention the HTML form.

Is there a specific add-on you're using to create a form in Confluence, and you want to use it in conjunction with the Livesearch Macro? Where will you be entering this code?

Lastly, please confirm your Confluence version so we can refer to it if we have any issues.



Hi Shannon. 

I don't know how to be more clear that I am not talking about confluence labels. I'm talking about the Label Element in the html that is produced by the livesearch macro, which I have pasted into my original comment and posted a direct link to w3c page which discusses the label element.

This happens on all versions of confluence, which you can see if you enter any confluence site into the web accessibility evaluation tool here: WAVE AIM:

You'll notice an error for the search box that the label (html label) is missing, so the search doesn't meet accessibility requirements and would actually be very very easy for Atlassian to fix. I wasn't sure if there is a way to modify the source code by the end user (me), or release a new livesearch macro plug-in as a work around. any other options I'm missing?

I'm not talking about creating a form.  When the LiveSearch marco is used, either in a page or with a tool like Adaptavist Theme Builder, it creates html code, which users view in their browser.  If the html code is viewed directly (I pasted it in question), one can see that it's a "form" since a user would fill in the form (a search term) and then click submit to submit the form.  What I'm saying is that Atlassian needs to add a Form Label to the Form which confluence creates via Livesearch.  This has nothing to do with Atlassian Labels or restricting a search to a label.  I understand how that could be confused with form labels.  Sorry if I sounded irritated.  I recently quit nicotine and am too easily irritable sometimes! I'm working on it.  Thank you Shannon.


Thank you so much for taking the time to verify that with me. We have the threads below to track Confluence section 508 compliance implementation, which would include your request:

Specifically, this:

Although each request is broken down into a separate request, the best one to vote on and watch is the primary section 508 request.

Thank you again for your time and best of luck with quitting!



Thanks, I voted for the issues.  I'm also looking into replacing the search with a custom search using instead of confluence's livesearch macro. We'll lose internal searching, but you can add the label for 508 compliance and can also get search analytics.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

323 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you