function addARIARole(strID, strRole)
{
	// Chercher les éléments identifiés par strID
	var objElement = document.getElementById(strID);

	if (objElement) {
		objElement.setAttribute('role', strRole); }
	
	// Chercher les éléments avec une class strID
    var divs = document.getElementsByTagName('div');
	
	for(var i=0; i<divs.length; i++) {
		if(divs[i].className == strID) {
			divs[i].setAttribute('role', strRole); }
	}
}

function addARIARequired(strID, strRole)
{
	// Chercher les éléments identifiés par strID
	var objElement = document.getElementById(strID);

	if (objElement) {
		objElement.setAttribute('aria-required', strRole); }
}

function setupARIA() {
	// Add ARIA roles to the document
	addARIARole('banner', 'banner');
	addARIARole('navigation', 'navigation');
	addARIARole('main', 'main');
	addARIARole('search', 'search');
	addARIARole('post', 'article');
	// addARIARole('contentinfo', 'contentinfo');
	addARIARole('comments', 'complementary');
	
	// Add ARIA-required attribute to the document
	addARIARequired('c_nom', 'true');
	addARIARequired('c_content', 'true');
}
