In terms of accessibility, is it OK to have something like:
<html lang="en">
<body>
<h2 lang="fr">Imagine this is in French</h2>
<h2 lang="en">English headline</h2>
<h2 lang="en">English headline</h2>
<h2 lang="fr">Imagine this is in French</h2>
</body>
</html>
Please note this is just a rough and ready example to demonstrate, I don't need HTML validation.
As you can see from the example, I assume that the ideal scenario would be to have the above but without lang definitions for the English headlines since it's given by the overall document. But is there any harm in defining them from an accessibility point of view?
The lang attribute can and should be used to indicate language changes within a document. This allows assistive technology - like the screen readers - to change their enunciation to read the text in an understandable accent.
Your example is ok, but unnecessary because the base language of the document is English, you only need to indicate the changes to other languages (the scope is hierarchical - i.e. it only applies to the element and its children).
<html lang="en">
<body>
<h2 lang="fr">Parlez-vous Francais?</h2>
<h2>English headline</h2>
<h2>English headline</h2>
<h2 lang="de">Sprechen Sie Deutsch?</h2>
</body>
</html>
Here is a W3C reference that supports this usage http://www.w3.org/International/questions/qa-lang-why.en