@@ -45,8 +45,15 @@ if (axe.commons.text.autocomplete.stateTerms.includes(purposeTerm)) {
 }
 
 const allowedTypes = allowedTypesMap[purposeTerm];
+
+/**
+ * Note:
+ * Firefox returns `node.type` as `text` for `type='month'`
+ * Hence using `node.getAttribute('type')` over `node.type`
+ */
+const nodeType = node.hasAttribute('type') ? node.getAttribute('type') : 'text';
 if (typeof allowedTypes === 'undefined') {
-	return node.type === 'text';
+	return nodeType === 'text';
 }
 
-return allowedTypes.includes(node.type);
+return allowedTypes.includes(nodeType);
// Select and textarea is always allowed
if (node.nodeName.toUpperCase() !== 'INPUT') {
	return true;
}

const number = ['text', 'search', 'number'];
const url = ['text', 'search', 'url'];
const allowedTypesMap = {
	bday: ['text', 'search', 'date'],
	email: ['text', 'search', 'email'],
	'cc-exp': ['text', 'search', 'month'],
	'street-address': ['text'], // Issue: https://github.com/dequelabs/axe-core/issues/1161
	tel: ['text', 'search', 'tel'],
	'cc-exp-month': number,
	'cc-exp-year': number,
	'transaction-amount': number,
	'bday-day': number,
	'bday-month': number,
	'bday-year': number,
	'new-password': ['text', 'search', 'password'],
	'current-password': ['text', 'search', 'password'],
	url: url,
	photo: url,
	impp: url
};

if (typeof options === 'object') {
	// Merge in options
	Object.keys(options).forEach(key => {
		if (!allowedTypesMap[key]) {
			allowedTypesMap[key] = [];
		}
		allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]);
	});
}

const autocomplete = node.getAttribute('autocomplete');
const autocompleteTerms = autocomplete
	.split(/\s+/g)
	.map(term => term.toLowerCase());

const purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
if (axe.commons.text.autocomplete.stateTerms.includes(purposeTerm)) {
	return true;
}

const allowedTypes = allowedTypesMap[purposeTerm];
if (typeof allowedTypes === 'undefined') {
	return node.type === 'text';
}

return allowedTypes.includes(node.type);

I agree that we need to use the attribute here rather than the DOM property, but you'll have to normalise it. I don't know exactly what that involves, you can look that up in the spec. It's probably case insensitive. It also needs to default to "text" when there's an invalid value here, not just when type isn't set. Otherwise an element with `type="foobar"` wouldn't be allowed to have autocomplete allowed for text.